Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Folder Authorization.

Reply
Thread Tools

Folder Authorization.

 
 
Thammarat Charoenchai.
Guest
Posts: n/a
 
      05-24-2005
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


 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      05-25-2005
> but <location path="/admin">
> or <location path="admin/">
> or <location path="admin"> is error.


What error are you getting? The last one should work.

-Brock
DevelopMentor
http://staff.develop.com/ballen



 
Reply With Quote
 
 
 
 
Thammarat Charoenchai.
Guest
Posts: n/a
 
      05-26-2005
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?


 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      05-26-2005
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

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

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




 
Reply With Quote
 
Thammarat Charoenchai.
Guest
Posts: n/a
 
      05-26-2005
It's working. Thank you very much.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browse to Folder instead of Folder + File Dan ASP .Net 7 10-28-2010 07:39 AM
Deployment: bin folder outside root folder? Jon Maz ASP .Net 12 07-01-2004 09:01 PM
For share a folder in the network , but the folder only allow by password holder MCSE 55 04-14-2004 11:56 PM
_vti_cnf folder in the bin folder-- a problem? William LaMartin ASP .Net 1 11-10-2003 03:41 AM
help: setting web folder as application folder in server THY ASP .Net 3 10-16-2003 01:18 AM



Advertisments