R
Randy
I have a asp.net 1.1 site and
HttpContext.Current.User.IsInRole(@"MyLocalComputer\MyGroup") always returns
false.
I've turned off anonymous access in iis, set the impersonate=true in the
web.config, even tried to impersonate via code using this. I've tried this
on XP Pro as well as 2003 server with the same results.
System.Security.Principal.WindowsImpersonationContext
impersonationContext;
impersonationContext =
((System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identit
y).Impersonate();
WindowsPrincipal myPrincipal =
(WindowsPrincipal)HttpContext.Current.User;
bool rc = myPrincipal.IsInRole(role);
rc = HttpContext.Current.User.IsInRole(role);
But rc is always false. My HttpContext.Current.User.Identity.Name is
returning Administrator as it should, but it doesn't recognize any groups
that i put administrator into.
Any ideas?
-Randy
HttpContext.Current.User.IsInRole(@"MyLocalComputer\MyGroup") always returns
false.
I've turned off anonymous access in iis, set the impersonate=true in the
web.config, even tried to impersonate via code using this. I've tried this
on XP Pro as well as 2003 server with the same results.
System.Security.Principal.WindowsImpersonationContext
impersonationContext;
impersonationContext =
((System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identit
y).Impersonate();
WindowsPrincipal myPrincipal =
(WindowsPrincipal)HttpContext.Current.User;
bool rc = myPrincipal.IsInRole(role);
rc = HttpContext.Current.User.IsInRole(role);
But rc is always false. My HttpContext.Current.User.Identity.Name is
returning Administrator as it should, but it doesn't recognize any groups
that i put administrator into.
Any ideas?
-Randy