Hi, I have configured my site to use Forms Authentication but it doesn't redirect me to the Login page. I simply get a 401 Unauthorized error. The Login page seems to be configured correctly in the Forms Authentication properties. Any ideas? Thanks!
Do you have a link I can look at? This is typically caused by the Authentication settings. You can see these settings using IIS 7 Manager and navigate to the button Authentication.
Try this link: http://aliveprc.w03.Winhost.com/Admin/Console.html I configured the Authentication in IIS Manager. I selected Forms Authentication and disabled the rest. Under the Rules I have only one rule: Allow role: administrators.
Make sure you have Basic Authentication enabled and make sure you set it up on the root and the subfolder.
Thanks for the reply. If I enable Basic Authentication then I get the typical Windows Dialog to enter the credentials. I want to use Forms Authentication and redirect to my login page. Also, when I enable Basic Authentication it does not accept any of the credentials set up in my membership/roles DB.
This is what I got: / (root) :: Allow All users |- Login.html |- Admin (Administration app) :: Allow administrators role |- User (Regular user app) :: Allow users role I want to use Forms Authentication, so that when trying to access either User/* or Admin/* it redirects to /Login.html to prompt for credentials. I had everything working fine in my development environment (local PC), but didn't work when moving to the Winhost server.
Normally the Anonymous User and Basic Authentication is enabled within the Authentication module of IIS 7. And it is through the ASP.Net configuration tool in Visual Studio that you set the access rules. Did you go through visual studio and set the asp.net configuration tool?
I found the problem. Here is a video that explains how to configure Forms Authentication using IIS 7: http://learn.iis.net/page.aspx/377/using-aspnet-forms-authentication/ The problem is that, by default, Forms Authentication is only enabled for .ASPX files and in my application I have .HTML files since the client is in Adobe Flex. To fix it you have to go (in IIS Manager 7) to Modules, then Edit DefaultAuthentication module and deselect the checkbox that limits the authentication to .aspx files. Then you have to do the same for the FormsAuthentication module. Once I did this I'm now redirected to my login page. I have a new problem though Even if I enter the credentials it keeps redirecting the request to the login page, so it never grants me access to the application. I will check the user configuration to see if everything is fine, but I welcome ideas Thanks!