Posted on: 4/15/2015 11:11:07 AM | Views : 682

I am using ASP.NET Identity. Forms Authentication is disabled in web.config, i.e.,
<modules> <remove name="FormsAuthentication" /> </modules> However, the user is required to authenticate using a login form (project property "Windows Authentication" == Disabled. I have restricted access to certain folders and pages using web.config. It works, but if a user tries to go to a page to which he has been denied access, he is redirected to the login form, without any idea why. I was expecting a 4xx HTTP error or something similar.
Is it *my* responsibility to detect that the user has been denied access? I would like to display a message in the Login form or a custom form, and perhaps provide a "Back"link to the page from which the illegal access was attempted.

Go to the complete details ...