Reputation: 3980
Why when I have forms authentication selected as below in my web config does it go to login.aspx for the request of file default.aspx which is in the root not the ~/account folder any suggestions for what i need to check thanks
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" name=".ASPXFORMSAUTH"></forms>
</authentication>
<location path="~/WebResource.axd">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="~/Account">
<system.web>
<authorization>
<deny users="*"/>
</authorization>
</system.web>
</location>
<location path="img">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="~/ScriptResource.axd">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="~/contactus.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="Telerik.Web.UI.WebResource.axd">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
Upvotes: 1
Views: 200
Reputation: 1975
To allow anonymous users access Default.aspx is root you should try:
<location path="~/Default.aspx">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
Upvotes: 1
Reputation: 6486
Add following block in web.config if you wish all users to visit the page without login
<location path="~/Default.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
it sets to allow anonymous users to this page
Upvotes: 0
Reputation: 3523
What is in your authentication section of the web.config?
Its' been a while but I think you have to explicitly grant access to things I think by default it is classed as locked down?
So you will need a root level grant permission.
Upvotes: 0
Reputation: 3274
You have a rule to explicitly let people view contactus.aspx, but no matching rule for default.aspx. Try adding a rule for that area.
I'm assuming you have a deny all rule somewhere that you haven't shown? You could always grant access to all of your site and then explicitly deny access to just /account as you have done.
Upvotes: 0