Search:
Namespaces
Discussions
.NET v1.1
Feedback
Correction. Roles in Windows Authentication
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngescalate' list
.
Sissel Johnsen
I did get one answer, but it was not what I was looking for.
Answer:
Yes..
User.IsInRole("\\DOMAIN\GROUP")
-----Original Message-----
From: Sissel Johnsen [mailto:
Click here to reveal e-mail address
]
Sent: 19. februar 2002 08:56
To:
Click here to reveal e-mail address
Subject: Roles in Windows Authentication
I tried to ask this on aspngsec and aspngfreeforall and got no answer. Now I
need to get this answered because the other list is not providing me with
valid answers.
Is it possible to retrieve the roles a user belongs to?
Using Windows Authentication.
Sissel
Reply to this message...
Tom Cabanski
So I take it you would like to iterate over the roles?
You cannot do it with
WindowsPrincipal
. You would have to do something
like the following:
1) Get a complete list of groups from the domain. Cache it in some way.
2) Check each item in the list (using User.IsInRole) to see if the user
is in the group and save that fact.
You could do this with a class the implements
IPrincipal
and replaces
the default
WindowsPrincipal
during authentication.
Enjoy
--------------------------------
Tom Cabanski, President
Objective Advantage, Inc.
http://www.oai.cc
Author of .NET Security coming soon from Manning
-----Original Message-----
From: Sissel Johnsen [mailto:
Click here to reveal e-mail address
]
Sent: Tuesday, February 19, 2002 3:07 PM
To: aspngescalate
Subject: [aspngescalate] Correction. Roles in Windows Authentication
I did get one answer, but it was not what I was looking for.
Answer:
Yes..
User.IsInRole("\\DOMAIN\GROUP")
-----Original Message-----
From: Sissel Johnsen [mailto:
Click here to reveal e-mail address
]
Sent: 19. februar 2002 08:56
To:
Click here to reveal e-mail address
Subject: Roles in Windows Authentication
I tried to ask this on aspngsec and aspngfreeforall and got no answer.
Now I
need to get this answered because the other list is not providing me
with
valid answers.
Is it possible to retrieve the roles a user belongs to?
Using Windows Authentication.
Sissel
| [aspngescalate] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngescalate.asp
= JOIN/QUIT
Reply to this message...
Sissel
Thanks for your reply.
> 1) Get a complete list of groups from the domain. Cache it in some way.
How do I get this list?
Best regards
Sissel
"Tom Cabanski" <
Click here to reveal e-mail address
> wrote in message
news:595995@aspngescalate...
[Original message clipped]
Reply to this message...
System.Security.Principal.IPrincipal
System.Security.Principal.WindowsPrincipal
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com