Re: Create a role and check it
- From: Dominick Baier <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 20 Feb 2007 17:01:19 +0000 (UTC)
You can check for the role using Page/Context.User.IsInrole("admins") or use the <authorization> element in web.config to declaratively restrict access to pages and directories using roles. The site map feature is also role aware.
What else should happen? ;)
Why do you have a <impersonate> element in config - you can remove that if you are not sure if you need it.
-----
Dominick Baier (http://www.leastprivilege.com)
Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)
Hello!
I 'm quite new to asp.net and trying to accomplish a web that gives
'admins'
some extra options in an aspx page.
I have a local group called admins at the dotnet server. In this group
I
have domain users/groups.
I have this "code" in the web.config:
<authentication mode="Windows"/>
<identity impersonate="true"/>
If the user is a member of the local group myserver\admins something
should
happend. Otherwise not!
How do I accomplish this? Please explain to a "dummie".
Regards Magnus
.
- Follow-Ups:
- Re: Create a role and check it
- From: Magnus
- Re: Create a role and check it
- References:
- Create a role and check it
- From: Magnus
- Create a role and check it
- Prev by Date: Create a role and check it
- Next by Date: Re: WindowsTokenRoleProvider & Domain Groups
- Previous by thread: Create a role and check it
- Next by thread: Re: Create a role and check it
- Index(es):
Relevant Pages
|