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
 
M

Michael D. Ober

Based on this - if I need a web-site that has a mix of non-secure, secure
without authentication, and secure with authentication pages, I can put the
non-secure and secure without authentication pages on one site and create a
virtual site for the secure with authentication pages and then have the
pages link back and forth? My question in this case is how do I keep the
login information should someone jump from the authenticated site to the
non-authenticated site and back.

Mike Ober.
 
G

Guest

Hi,

You can keep the login information in a windows custom security object
(Windows Identity and Windows Principal) and save the object.
Then restore back the object when the user re-enters the authenticated site.
But the catch is doing this in a secure manner.
That is you have to keep track of a user when he enter the non-auth site and
then re-enters the auth site. you have to be sure that it is the same
user?????
Since this is a problem, it is always safe and easier to have the user login
again if he re-enters the auth site.


Regards
--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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top