When I run the page and enter my login, I got login but when I click to a secure Admin page I got the following error:
Server Error in '/Membership' 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:2.0.50727.42;
ASP.NET Version:2.0.50727.210
Here are my Web.config setting:
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings/>
<location path="membership" allowOverride="false">
<system.web>
<siteMap defaultProvider="default" enabled="true">
<providers>
<add name="default"
type="System.Web.XmlSiteMapProvider "
siteMapFile="Web.sitemap"
securityTrimmingEnabled="true" />
</providers>
</siteMap>
here are my web.sitemap file:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="Navigate Here" description="">
<siteMapNode url="Login.aspx" title="Login" description="" />
<siteMapNode url="CreateAccount.aspx" title="Create Account" description="" />
<siteMapNode url="ChangePW.aspx" title="Change Password" description="" />
<siteMapNode url="ForgotPW.aspx" title="Forget Password" description="" />
<siteMapNode url="Logged Out.aspx" title="Logged Out" description="" />
<siteMapNode url="Admin\ManageAccount.aspx" title="Admin Account" roles="administrators" description="" >
<siteMapNode url="Admin\Page1.aspx" title="Page 1" roles="administrators"/>
<siteMapNode url="Admin\Page2.aspx" title="Page 2"/>
<siteMapNode url="Admin\Admin.aspx" title="Admin" description="" />
</siteMapNode>
</siteMapNode>
</siteMap>
and my Admin/web.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
<allow roles="administrators" />
<allow roles="Admin" />
<deny users="*" />
</authorization>
</system.web>
</configuration>
can someone please tell what is the problem? I have been trying for many times to fix it.