Re: Disable FORMS AUTHENTICATION selectively in 2.0
- From: "Joe Kaplan" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Dec 2006 13:20:37 -0600
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 ***
.
- Follow-Ups:
- References:
- Prev by Date: Re: Forms Based Authentication Issue (VIEWSTATE) Login Form On Non Protected Page
- Next by Date: Re: Disable FORMS AUTHENTICATION selectively in 2.0
- Previous by thread: Disable FORMS AUTHENTICATION selectively in 2.0
- Next by thread: Re: Disable FORMS AUTHENTICATION selectively in 2.0
- Index(es):