Ask a Question related to ASP.NET Security, Design and Development.
-
Matias Woloski #1
authorization different paths and roles
I have this authorization config in my web.config
<location path="manager">
<system.web>
<authorization>
<deny users="?" />
<allow roles="admins" />
</authorization>
</system.web>
</location>
<location path="resourcemgr">
<system.web>
<authorization>
<deny users="?" />
<allow roles="resourceEditors" />
</authorization>
</system.web>
</location>
I need to give access to the "manager" dir for the "admins" role and access
to "resourcemgr" dir for the "resourceEditors" role
With this config is allowing me to get in the "manager" dir using the
"resourceEditors", and that couldn't be.
Am I missing something?
thanks
MAtias
Matias Woloski Guest
-
Directory paths: roles vs. users
We have a fairly large site with lots of authors. Most of them will have identical permissions and options, except for the directory they are... -
ASP.NET Authorization
I'd like to use role in Forms authentication and I found the following words from .net SDK about ASP.NET Authorization. " Identifies a targeted... -
Options for roles attribute of <authorization>/<allow> tag ...
I'd like to restrict access to a page to the people in a group that doesn't have a unique name, so domain\group doesn't work. I've gotten it to work... -
Bringing paths into Photoshop from AI as PATHS
What happened to bringing paths into Photoshop from Illustrator as PATHS? Used to be able to copy paths into Photoshop from AI 8 as a path. Can this... -
need general help with setting paths & man paths for apps
On Thu, 10 Jul 2003, solaris newbie wrote: That is one way, but a (perhaps) beter way would be to modify PATH in individual user's .profile. ... -
naijacoder naijacoder #2
Re: authorization different paths and roles
<location path="manager"> is this path MANAGER a drirectory in IIS or a
group?
Try using <deny> and see if it will go..
Cheers
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
naijacoder naijacoder Guest
-
Matias Woloski #3
Re: authorization different paths and roles
Writing this, it won't allow anyone to get into manager,
<location path="manager">
<system.web>
<authorization>
<allow roles="admins" />
<deny users="*" />
</authorization>
</system.web>
</location>
However, I still cannot make it work to only allow "admins" role.
any ideas?
thanks!
Matias
"naijacoder naijacoder" <naijacoder@toughguy.net> wrote in message
news:eRVeRUVjEHA.2524@TK2MSFTNGP11.phx.gbl...> <location path="manager"> is this path MANAGER a drirectory in IIS or a
> group?
> Try using <deny> and see if it will go..
> Cheers
>
>
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Matias Woloski Guest
-
Hernan de Lahitte #4
Re: authorization different paths and roles
Hi Matias,
I assume that you are using Forms Authentication and you are filling the
roles info with the appropriate data. Otherwise if you use Windows Auth you
should add the domain info the group name (role). Regarding the first
scenario, your last config should be fine: (apply the same to the
'resourcemgr' folder with the 'resourceEditors' role)
This section may be located in the root web.config file.> <location path="manager">
> <system.web>
> <authorization>
> <allow roles="admins" />
> <deny users="*" />
> </authorization>
> </system.web>
> </location>
You should have this setting in the system.web main section as well.
<authorization>
<deny users="?" />
</authorization>
Notice that all users with the 'admins' role inlcuded in it's roles
collection will be allowed to access the manager folder.
--
Hernan de Lahitte
Lagash Systems S.A.
[url]http://weblogs.asp.net/hernandl[/url]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Matias Woloski" <woloski@NOSPAMsion.com> wrote in message
news:uazgtXpjEHA.3608@TK2MSFTNGP09.phx.gbl...> Writing this, it won't allow anyone to get into manager,
>
> <location path="manager">
> <system.web>
> <authorization>
> <allow roles="admins" />
> <deny users="*" />
> </authorization>
> </system.web>
> </location>
>
> However, I still cannot make it work to only allow "admins" role.
>
> any ideas?
>
> thanks!
> Matias
>
> "naijacoder naijacoder" <naijacoder@toughguy.net> wrote in message
> news:eRVeRUVjEHA.2524@TK2MSFTNGP11.phx.gbl...>>> <location path="manager"> is this path MANAGER a drirectory in IIS or a
>> group?
>> Try using <deny> and see if it will go..
>> Cheers
>>
>>
>>
>>
>> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
>> Don't just participate in USENET...get rewarded for it!
>
Hernan de Lahitte Guest
-
Matias Woloski #5
Re: authorization different paths and roles
Thanks to everyone.
It wasn't a config problem. This was a code I inherit from someone :s The
global.asax was hooked to the AuthenticationRequest event and was getting
the roles from a cookie and didn't refreshed the db role for the user.
thanks again,
Matias
Soutworks
[url]http://blogs.southworks.net/matiaswoloski[/url]
"Hernan de Lahitte" <hernan@lagash.com> wrote in message
news:#$zBUorjEHA.3664@TK2MSFTNGP11.phx.gbl...you> Hi Matias,
>
> I assume that you are using Forms Authentication and you are filling the
> roles info with the appropriate data. Otherwise if you use Windows Authrights.> should add the domain info the group name (role). Regarding the first
> scenario, your last config should be fine: (apply the same to the
> 'resourcemgr' folder with the 'resourceEditors' role)
>>> > <location path="manager">
> > <system.web>
> > <authorization>
> > <allow roles="admins" />
> > <deny users="*" />
> > </authorization>
> > </system.web>
> > </location>
> This section may be located in the root web.config file.
> You should have this setting in the system.web main section as well.
>
> <authorization>
> <deny users="?" />
> </authorization>
>
> Notice that all users with the 'admins' role inlcuded in it's roles
> collection will be allowed to access the manager folder.
>
>
> --
> Hernan de Lahitte
> Lagash Systems S.A.
> [url]http://weblogs.asp.net/hernandl[/url]
>
>
> This posting is provided "AS IS" with no warranties, and confers no>
> "Matias Woloski" <woloski@NOSPAMsion.com> wrote in message
> news:uazgtXpjEHA.3608@TK2MSFTNGP09.phx.gbl...>> > Writing this, it won't allow anyone to get into manager,
> >
> > <location path="manager">
> > <system.web>
> > <authorization>
> > <allow roles="admins" />
> > <deny users="*" />
> > </authorization>
> > </system.web>
> > </location>
> >
> > However, I still cannot make it work to only allow "admins" role.
> >
> > any ideas?
> >
> > thanks!
> > Matias
> >
> > "naijacoder naijacoder" <naijacoder@toughguy.net> wrote in message
> > news:eRVeRUVjEHA.2524@TK2MSFTNGP11.phx.gbl...> >> >> <location path="manager"> is this path MANAGER a drirectory in IIS or a
> >> group?
> >> Try using <deny> and see if it will go..
> >> Cheers
> >>
> >>
> >>
> >>
> >> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> >> Don't just participate in USENET...get rewarded for it!
> >
>
Matias Woloski Guest



Reply With Quote

