title: ClaimsPrincipalPermission - Error Code
body: <p>I use the ClaimsPrincipalPermission for authorization in my asp 4.5 website.</p>
  
  <p>This works fine.</p>
  
  <p>But when the user tries to call a page which he is not allowed the error code returned is a 500 and not some like 401.</p>
  
  <p>Is this the expected behavior ? I assume 401 would express more why this page can't be called.</p>
  
  <p>Or do I have an error ?
  In the debugger I see that a securityexception is correctly thrown.</p>
  
  <p>Is there a way to chjange this behvaior ? Does anyone know why this happens?</p>