Hi all,
I have another question regarding webservices. I have one set up to access the active directory. As a test i have put in the following code as a method to see if it works.
I have a similar piece of code on the form where i call the web service for, and this is where the problem lies.Code:[WebMethod(Description="Test function to test AD access")] public string testFunction(string username, string pwd) { string testStr = string.Empty; DirectoryEntry de = new DirectoryEntry("LDAP://DC=optos,DC=eye" ,username ,pwd); foreach(DirectoryEntry child in de.Children) { testStr = testStr + "<BR>" + child.Name.ToString(); } return testStr; }
The code runs fine on the form which calls the web service. When i call the web service however i get the following error:
<i>"Server was unable to process request. --> The specified domain either does not exist or could not be contacted"</i>
The security on the main form is set to impersonate=true and anonymous access has been removed from the IIS properties for the app. On the web service, again impersonte=true but this time anonymous is checked. When it is unchecked i get Access denied errors.
Does anyone have any ideas why this is happening.
Thanks,
Grant




Reply With Quote