User352874389 posted
Hi all,
I hope you can help me with the problem I have described below. I can't find out what I'm doing wrong. I'm trying to use very basic form authentication in an ASP.NET webforms application, but my logon.aspx page cannot be displayed.
The error message is:
Server Error in '/' Application.
Access is denied.
Description:
An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
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.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.114.0
My web.config is:
<location path="Logon.aspx">
<system.web>
<authorization>
<allow users ="*"/>
</authorization>
</system.web>
</location>
<system.web>
<authentication mode="Forms">
<forms loginUrl="Logon.aspx">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
I appreciate your help. Thanks in advance!
Cheers.