Re: Create a role and check it
- From: "Magnus" <magnus.blomberg@xxxxxxxxxx>
- Date: Thu, 22 Feb 2007 17:18:11 +0100
Thank you. It worked perfectly!!!
Well, from the beginning I thought of using impersonate because the user
should use a database with his/her own account. Changed it to use one common
sql account instead, so that's true, I don't need impersonate anymore.
Does that make any sence to you?
Regards Magnus
"Dominick Baier" <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:51eb30488d8d8c9233041f31674@xxxxxxxxxxxxxxxxxxxxx
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
.
- References:
- Create a role and check it
- From: Magnus
- Re: Create a role and check it
- From: Dominick Baier
- Create a role and check it
- Prev by Date: Re: WindowsTokenRoleProvider & Domain Groups
- Next by Date: Re: Question about cookie protection and FormsAuthentication.Encry
- Previous by thread: Re: Create a role and check it
- Next by thread: Re: WindowsTokenRoleProvider & Domain Groups
- Index(es):
Relevant Pages
|
|