Folder Authorization.

  • Thread starter Thammarat Charoenchai.
  • Start date
T

Thammarat Charoenchai.

Hi.

How I set <location path="/admin"> for my all file in "xxx" folder.

now i can use <location path="/admin/main.aspx"> it's work.

but <location path="/admin">
or <location path="admin/">
or <location path="admin"> is error.


anyone please help me. and sorry for my english :)
 
T

Thammarat Charoenchai.

When i use this code in /web.config

<location path="admin">
<system.web>
<authorization>
<allow users="admin"/>
</authorization>
</system.web>
</location>

I think it should be allow only user name "admin" but when I run it allow
every user.

but if I use

<location path="admin">
<system.web>
<authorization>
<deny users="*"/>
</authorization>
</system.web>
</location>

It's not allow all users.

what i'm worng? :)
 
D

Dominick Baier [DevelopMentor]

Hello Thammarat Charoenchai.,

always add a <deny users="*" /> at the end.

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

is the right one
 

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,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top