title: Asp.net Mvc custom mechanism to handle unauthorized request
body: <p>For my website i want following behaviors for secured controller(or action)</p>
  
  <p>if a user makes a normal request redirect to login page (which i have easily able to do)</p>
  
  <p>if request is Ajax  type  <code>Request.IsAjaxRequest()==true</code>, return status code 401 </p>
  
  <p>How can i create a filter for this??</p>