Excluding certian pages from Forms authentication

G

Guest

Hi,

I've a web application and I'm using Forms authentication. My app contains
some pages that can be viewed by everyone and it doesn't require any
authentication or authoization and these pages mostly come at the start of
the application. After a couple of such 'general' pages, the login screen
comes. How do tackle this situation? Advance thanks for throwing any light on
this
 
G

Guest

Hi,

You can also try using a Location Tag with Authorization in the Web.config.
Here is a example of the web.config, where the below used pages do not need
authentication.

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

<location path="GenericErrorPage.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
--

This is an easier approach than having to maintain multiple directories and
multiple web.configs.
Hope this was helpful.

--Vijay R
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top