G
Guest
I wrote the following code in a ASP.Net page:
DirectoryEntry objDE;
string strPath="LDAP://DC=cna,DC=com";
// Create a new DirectoryEntry with the given path.
objDE=new DirectoryEntry(strPath);
foreach(DirectoryEntry objChildDE in objDE.Children)
Response.Write(objChildDE.Path);
When I try to run the code, I get the following error:
"The specified domain either does not exist or could not be contacted."
When I run the same code as a Console Application/WinForms, it works fine. I believe it is some permission issue but am not able to nail it. Can somebody please help me?
DirectoryEntry objDE;
string strPath="LDAP://DC=cna,DC=com";
// Create a new DirectoryEntry with the given path.
objDE=new DirectoryEntry(strPath);
foreach(DirectoryEntry objChildDE in objDE.Children)
Response.Write(objChildDE.Path);
When I try to run the code, I get the following error:
"The specified domain either does not exist or could not be contacted."
When I run the same code as a Console Application/WinForms, it works fine. I believe it is some permission issue but am not able to nail it. Can somebody please help me?