LCMSdev
asked on
IIS 7 and ASP.NET Forms authentication
Using the Web Application Administration menu in Visual Studio 2010, I've configured forms authentication on my ASP.NET application. I've got usergroups with the proper permissions, and a login form.
When I test the application from Visual Studio by clicking "View in Browser" on one of the secured pages in the solution explorer, I am properly directed to the login form. But, when I deploy the application on the webserver, it doesn't do this.
Instead, I get two different results depending on IIS settings: If I enable anonymous authentication and forms authentication in IIS, then I can access any part of the application without getting redirected to the login screen. If I enable ONLY forms authentication, I do get redirected to the login screen URL, but I get a 401 error because I don't have permissions to view the login form.
Can someone please explain what I'm doing wrong? What settings do I need to change in IIS and/or the application in order for this to work correctly?
When I test the application from Visual Studio by clicking "View in Browser" on one of the secured pages in the solution explorer, I am properly directed to the login form. But, when I deploy the application on the webserver, it doesn't do this.
Instead, I get two different results depending on IIS settings: If I enable anonymous authentication and forms authentication in IIS, then I can access any part of the application without getting redirected to the login screen. If I enable ONLY forms authentication, I do get redirected to the login screen URL, but I get a 401 error because I don't have permissions to view the login form.
Can someone please explain what I'm doing wrong? What settings do I need to change in IIS and/or the application in order for this to work correctly?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.