J
Jason
In an ASP.NET application designed as intranet using Windows Authentication.
I am trying to query a PDC group to see if a string matches a user that is
assigned to the group using the function below. On my development box, all is
ok when I access through debug or using the http://localhost. When I access
this on the deployment server 2003 or on my dev box using the
http://ipaddress I get an
access is denied on the line:
object oRet = de.Invoke("Members") .
What changes to security do I need to apply? I have an NT group that
limits all the users that can run this.
TIA, Jason
private bool UserIdExistsInNT4Group()
{
DirectoryEntry de = new DirectoryEntry();
de.Path = @"WinNT://wfdcptnt1/CMStest,group";
object oRet = de.Invoke("Members");
IEnumerable users = (IEnumerable) oRet;
foreach(object user in users)
{
DirectoryEntry det = new DirectoryEntry(user);
string tuserid = det.Path;
tuserid = tuserid.Replace("WinNT://", "");
tuserid = tuserid.Replace("/", "\\");
_log.Debug(tuserid);
if (tuserid.ToUpper() == this.UserId.ToUpper())
{
return true;
}
}
return false;
}
I am trying to query a PDC group to see if a string matches a user that is
assigned to the group using the function below. On my development box, all is
ok when I access through debug or using the http://localhost. When I access
this on the deployment server 2003 or on my dev box using the
http://ipaddress I get an
access is denied on the line:
object oRet = de.Invoke("Members") .
What changes to security do I need to apply? I have an NT group that
limits all the users that can run this.
TIA, Jason
private bool UserIdExistsInNT4Group()
{
DirectoryEntry de = new DirectoryEntry();
de.Path = @"WinNT://wfdcptnt1/CMStest,group";
object oRet = de.Invoke("Members");
IEnumerable users = (IEnumerable) oRet;
foreach(object user in users)
{
DirectoryEntry det = new DirectoryEntry(user);
string tuserid = det.Path;
tuserid = tuserid.Replace("WinNT://", "");
tuserid = tuserid.Replace("/", "\\");
_log.Debug(tuserid);
if (tuserid.ToUpper() == this.UserId.ToUpper())
{
return true;
}
}
return false;
}