Re: Disable FORMS AUTHENTICATION selectively in 2.0



Instead of just setting the authorization element in web.config to require
authentication for all pages, you need to use the <location> element to set
different authorization settings for different paths. The .NET Framework
documentation has the exact schema documentation and examples for you to
follow.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Ben" <nospam@xxxxxxxxxx> wrote in message
news:O9d9rRqKHHA.1008@xxxxxxxxxxxxxxxxxxxxxxx

Hi,
I have implemented a .NET 2.0 app which uses Forms Authentication, sets
a cookie upon succesful validation from DB etc. Everything works as
expected and all pages go to the login page before being sent to the
requested page etc.
Now the requirements have changed and I need to allow certain pages to
not require login. How do I accomplish this?
This is the relevant code in web.config

<forms loginUrl="login.aspx" protection="All" timeout="30"
name="TEST_AUTH" path="/" requireSSL="false" slidingExpiration="true"
defaultUrl="help.aspx" cookieless="UseDeviceProfile"
enableCrossAppRedirects="false"/>

Thanks,
Ben



*** Sent via Developersdex http://www.developersdex.com ***


.