asp.net FORMS authentication question

  • Thread starter Thread starter kevin
  • Start date Start date
K

kevin

hi all

with forms authentication, how does that work for a site with introduction
and tour or maybe some more pages?
by using forms authentication, all pages have to be authenticated before
viewing, but in case when only the database access page needed to be
authenticated, how would forms authentication work for that? does it needed
to be broke down into two asp.net apps, one authentication mode = none the
other using forms ?
 
Hi Keven,

You can specify that you want to allow anonymous access to certain pages on
the website without requiring the user to be authenticated. To do so, add
the following at the bottom of your web.config file (before the closing
/configuration tag)

<location path="TOURPAGE.aspx">
<system.web>
<authorization>
<allow users="*" />
<allow users="?" />
</authorization>
</system.web>
</location>


-Mark Heimonen
 
put the pages that you don't want to be protected by FormsAuth into their
own directory.
then inside that dir create a web.config file with this in it.

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<system.web>

<authorization>

<allow users="*" />

</authorization>

</system.web>

</configuration>
 
Back
Top