title: MVC 4 Unauthorized access error page
body: <p>I'm trying to create custom error pages for a <code>MVC 4</code> application. But I can't seem to find proper reference material to learn about it.</p>
  
  <p>I have a specific requirement. It's to do with <code>Unauthorized access</code> error. Say I have a set of pages which is only accessible to certain type of users. User typed <code>Admin</code> is authorized to access the admin page but the User typed <code>Basic</code> is not.</p>
  
  <p>So what I want to do is, if the user who's type is <code>Basic</code> is logged into the website and if they try to visit the admin page, instead of throwing them to the login page show them a message in an error page.</p>
  
  <p>Can anyone help me with how to achieve this?</p>