title: ASP.NET - Redirect to Error Page if Roles Authorization Fails
body: <p>I am using MVC 3 with Forms Authentication. On my controller or methods, I am doing the following:</p>
  
  <pre><code>[Authorize (Roles = "developer")]
  </code></pre>
  
  <p>In this situation, I want to check if the user is logged in and if not, return them to the login page. However, if the 'IsInRole' check for that user returns false, I want them to go to a different view that says something like 'Not authorized'.</p>
  
  <p>What is the best way to accomplish something like this? I was hoping to avoid creating a new Authorization attribute so I didn't have to refactor every Authorize attribute in my entire application, but if that is what is required, I will go that route.</p>