Forms Authentication Question

S

Samuel Shulman

Using FormsAuthentication I would like to protect to folders 1 for admin and
one for the clients, obviously clients who are authenticated can't have
access to the admin folder

Can anyone tell me what is the general approach to achieve that?

Thank you,
Samuel
 
P

PeterKellner

Using FormsAuthentication I would like to protect to folders 1 for admin and
one for the clients, obviously clients who are authenticated can't have
access to the admin folder

Can anyone tell me what is the general approach to achieve that?

Thank you,
Samuel

you can allow access to directories by roles in the system.web section
of your web.config

The below would allow just the role "admin" into the directory
admindir/files.

<location path="admindir/files" >
<system.web>
<authorization >
<allow roles="admin"/>
<deny users="*"/>
</authorization>
</system.web>
</location>

Good Luck
Peter Kellner
http://peterkellner.net
 

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,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top