title: HttpStatusCodeResult(401) returns “200 OK”
body: <p>Using ASP.NET MVC 5, I would like to return appropriate HTTP status code for different scenarios (401 for user is not authenticated, 403 when user has no right for some resource, etc.), then handle them in jQuery.</p>
  
  <p>But the problem is, when I try to return 401, it always returns "200: OK". MVC 5 RC1 was giving "302: Found" instead of 401, so I could use a workaround (<a href="https://stackoverflow.com/questions/18728631/httpstatuscoderesult401-returns-302-found">HttpStatusCodeResult(401) returns &quot;302 Found&quot;</a>).
  But now I moved from MVC 5 RC1 to MVC 5 and this behaviour changed. Now it is always "200: OK". So my workaround is useless, of course I can't replace 200 with anything else.</p>
  
  <pre><code>public ActionResult My()
  {
      if (User.Identity.IsAuthenticated == false)
      {
          return new HttpStatusCodeResult(401, "User is not authenticated."); 
              // Returns "200: OK"
      }
  
     // ... other code ...
  }
  </code></pre>
  
  <p>How to solve this?</p>