Ask a Question related to ASP.NET Security, Design and Development.
-
Peter Moberg #1
Role empty in WindowsPrincipal
Hello.
I have a test system with one Win2003 server as a domain controller and one
WinXP client. The domain has been setup and the WinXP client is part of the
domain. I have added a domain user that I log on as on the WinXP client. I
wrote a little program to see what groups the user belonged to after having
logged in.
this is part of the code..
AppDomain.CurrentDomain.SetPrincipalPolicy(
System.Security.Principal.PrincipalPolicy.WindowsP rincipal);
System.Threading.Thread.CurrentPrincipal.IsInRole(
System.Security.Principal.WindowsBuiltInRole.User. ToString());
Basically Im just telling the system to make sure that the CurrentPrincipal
returns a WindowsPrincipal type and the last statement is just to make sure
that the roles are loaded. (I guess the .NET framework will not load all the
roles until you call the IsInRole function)
When I look at the CurrentPrincipal in the watch window it says that the
user belongs to x nbr of groups. I check the groups and can see that they
indeed are the domain groups...like Domain Users and Domain Admins...
However I have also put the specific user in a domain local group called
TestGroup. This one doesnt show up in the roles list for the
WindowsPrincipal. However, there is one entry in the role list that is the
empty string and Im wondering if there is a problem with getting to domain
local groups?
Does anyone know if the domain local groups will not be listed in the
WindowsPrincipal object... or do any have any insight into this matter.
Any help is greatly appreciated!
Thanks,
Peter
Peter Moberg Guest
-
WindowsPrincipal.IsInRole() is Being Flaky. Help!!
Its just being inconsistent. I'm in 3 different Groups in AD. ..IsInRole("Groupx") returns true ..IsInRole("Groupy") returns true... -
isinrole reverts to windowsprincipal?
I'm trying to assign all roles (AD and custom pulled from SQL Table) to users when they login to the app using Windows Authentication. The code... -
WindowsPrincipal.IsInRole() problem with non-builtin roles
Can't get WindowsPrincipal.IsInRole() to work for me when using Windows Authentication. Here's a snippit of code from my C# codebehind page: ... -
Why won't WindowsPrincipal show as IUSR_<machine> ?
It will be IUSER_MACHINE if you leave anonymous turned on in IIS AND enable impersonation in your web.config. Joe K. "Odie"... -
CurrentPrincipal, WindowsPrincipal
Hello Friend Please check following Cod Dim x As System.Security.Principal.WindowsPrincipa x = System.Threading.Thread.CurrentPrincipa...



Reply With Quote

