Folder permission

V

Vinod

Hi,

I am a new to dot net , i would like to know how we can set folder
permissions.
My requirement is as follows.

a) I have two types of users:- admins and users, This information is
stored in my sql database.
I want my admins only to access admin folder in the sample
http://localhost/sample/admin/.

How can i set it in my web.config. ?

Thanks in advance

Vinod
 
B

Brock Allen

You should use the <authorization> and <role> elements in web.config to indicate
which set of roles you want to allow/disallow to that folder. You can put
a web.config in each of the sub folders to indicate your authorization rules.
Here are the docs:

http://msdn.microsoft.com/library/d...html/gngrfauthorizationsection.asp?frame=true

The other approach is to use the <location> element in the root web.config,
instead of having a seperate web.config for each sub folder:

http://msdn.microsoft.com/library/d...nref/html/gngrflocationelement.asp?frame=true
 

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,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top