| Article: |
ASP.NET Forms Authentication - Part 1 | |
| Subject: | can not login in unsecured zone | |
| Date: | 2003-06-05 11:02:34 | |
| From: | anonymous2 | |
| This article assumes the login page is in the secured portion of the website. What if there is an unsecured portion (main directory) and a secured portion (subdirectory)? I want the user to be able to input credentials in the login page contained in the public area. If authenticated from the database, the user is redirected to the private home page in the secured directory. | ||
Showing messages 1 through 1 of 1.




<system.web>
<authentication mode="Forms" >
<forms
name="MyApp"
path="/"
loginUrl="Logon.aspx"
protection="All"
timeout="20">
</forms>
</authentication>
</system.web>
You will need to add after the </system.web> something like this:-
<location path="Public">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
This will allow anyone (authorised or not authorised) to access the pages in the "Public" directory.