Hi All,
I hope that this forum is the right place for asking my question and apologize in advance, if it isn't.
I develop a WCF service, which is supposed to authenticate a user via LDAP.
My service is hosted on IIS7, which runs on a Windows 7 Ultimate machine, and uses a.NET v4.0 application pool with the Integrated pipeline mode.
The machine establishes a VPN channel to the user domain, but the machine is not a part of this domain; the application pool runs under a local to the machine account.
The WCF service uses PrincipalContext to get the job done:
PrincipalContext l_ctx = new PrincipalContext(ContextType.Domain, "acme.local");
The call to the PrincipalContext c-tor throws the following exception:
System.DirectoryServices.AccountManagement.PrincipalServerDownException: The server could not be contacted. ---> System.DirectoryServices.Protocols.LdapException: The LDAP server is unavailable. at System.DirectoryServices.Protocols.LdapConnection.Connect() at System.DirectoryServices.Protocols.LdapConnection.SendRequestHelper(DirectoryRequest request, Int32& messageID) at System.DirectoryServices.Protocols.LdapConnection.SendRequest(DirectoryRequest request, TimeSpan requestTimeout) at System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig(String serverName, ServerProperties& properties) --- End of inner exception stack trace --- at System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig(String serverName, ServerProperties& properties) at System.DirectoryServices.AccountManagement.PrincipalContext.DoServerVerifyAndPropRetrieval() at System.DirectoryServices.AccountManagement.PrincipalContext..ctor(ContextType contextType, String name, String container, ContextOptions options, String userName, String password) at System.DirectoryServices.AccountManagement.PrincipalContext..ctor(ContextType contextType, String name)
I am able to ping the domain controller from the machine, but neither a sniffer on the IIS machine nor the monitoring tools on the domain side show no access to the domain controller.
I have played with different constructors of PrincipalContext, but they end up throwing the same exception.
I searched the web, but could not find an applicable answer.
At this point I am totally out of ideas or direction and the community is my only hope.
I am looking forward to any kind of assistance, and thank you all in advance.