title: How do I serve up an Unauthorized page when a user is not in the Authorized Roles?
body: <p>I am using the <code>Authorize</code> attribute like this:</p>
  
  <pre><code>[Authorize (Roles="Admin, User")]
  Public ActionResult Index(int id)
  {
      // blah
  }
  </code></pre>
  
  <p>When a user is not in the specified roles, I get an error page (resource not found).  So I put the <code>HandleError</code> attribute in also.</p>
  
  <pre><code>[Authorize (Roles="Admin, User"), HandleError]
  Public ActionResult Index(int id)
  {
      // blah
  }
  </code></pre>
  
  <p>Now it goes to the <em>Login</em> page, if the user is not in the specified roles.</p>
  
  <p>How do I get it to go to an <em>Unauthorized</em> page instead of the login page, when a user does not meet one of the required roles?  And if a different error occurs, how do I distinguish that error from an Unauthorized error and handle it differently?</p>