setting up web.config...

R

RAB

I am designing an application. I have 5 web pages. Page1.aspx,
Page2.aspx, Page3.aspx, Page4.aspx and Login.aspx

I want any user to freely be able to navigate between Page1.aspx and
Page2.aspx

However, I only want users who submit a valid username and password on
Login.aspx to be able to navigate to Page3.aspx and Page4.aspx

How do I set up my web.config file in order to have this functionality?

Thanks,
RABMissouri
 
J

Juan T. Llibre

You can :

1. Assign your users to a role and limit access with <location path=...> in web.config.

2. Place the protected files in a subdirectory,
and control access with <location path=...> in web.config.

http://www.howtodothings.com/computers/a792-aspnet-forms-authentication-with-roles.html

3. You can also setup security per-page :

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

http://www.asp101.com/articles/matt/securesite/default.asp
 

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

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top