hi
i'm trying to run my web application on IIS6 (WinServer 2003). site should be public, because certain users (not in domain) should be able to login.
i don't have to mention that in vs 2010 everything is working fine, but when i click browse for my site in IIS 6 manager, home page is displayed correctly but when try to log in i'm getting this error:
"Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance."
i'm using LoginView control on masterpage which anonymous template link should redirect to login.aspx:
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ <a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server">Login</a> ]
</AnonymousTemplate>
<LoggedInTemplate>
User: <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log off" LogoutPageUrl="~/"/> ]
</LoggedInTemplate>
</asp:LoginView>
my web.config is configured as follows:
<?xml version="1.0" encoding="utf-8"?><configuration><location path="Styles"><system.web><authorization><allow users="*"/></authorization></system.web></location><location path="images"><system.web><authorization><allow users="*"/></authorization></system.web></location><connectionStrings><add name="connString" connectionString="Data Source=db;Initial Catalog=db;user id=user;password=pswrd" /></connectionStrings><system.web><compilation debug="true" targetFramework="4.0" /><authentication mode="Forms"><forms loginUrl="~/Account/Login.aspx" timeout="2880" /></authentication><httpRuntime maxUrlLength="100000" relaxedUrlToFileSystemMapping="true" /><authorization><deny users="?" /><allow users="*" /></authorization><pages><controls><add tagPrefix="cc1" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /></controls></pages></system.web><system.webServer><modules runAllManagedModulesForAllRequests="true" /></system.webServer></configuration>
IIS properties for my web site are:
enable anonymous access: checked
integrated windows authentication: not checked
user name: IUSR_DEVELOPER
in fact, this is not working ok at all, because if user is not logged in it should be redirected immediately to login page without displaying a home page at all, but in this case home page (default.aspx) is displayed.
please help me to solve this login issue.