我想通過.NET 4 Web服務中的安全SSL連接連接到Active Directory輕型目錄服務2008 R2的實例,並且我得到「服務器是不可操作「。錯誤。如何通過SSL連接到AD LDS?處理「服務器不可操作」錯誤
- 我正在使用使用ADSI編輯器創建並置於管理員角色中的用戶。
- 我能夠通過ADSI編輯器與此用戶使用SSL和簡單綁定進行登錄/連接,並且我可以使用相同的用戶憑據連接到Web服務,但使用非SSL端口。
- 我正在使用專有名稱和
- 用戶絕對不是無效的。
下面是我用綁定代碼:
DirectoryEntry entry = new DirectoryEntry("LDAP://2.2.2.2:636/DC=nfa,DC=local");
entry.Username = "CN=ldapadmin,DC=nfa,DC=local";
entry.Password = "[email protected]";
entry.AuthenticationType = AuthenticationTypes.SecureSocketsLayer;
我已經嘗試過類似這樣的還有:
DirectoryEntry entry2 = new DirectoryEntry("LDAP://2.2.2.2:636/DC=nfa,DC=local", "CN=ldapadmin,DC=nfa,DC=local", "[email protected]", AuthenticationTypes.SecureSocketsLayer);
我已經嘗試過類似這樣的還有:的DirectoryEntry ENTRY2 =新的DirectoryEntry(「LDAP://2.2.2.2:636/DC = NFA,DC =本地「,」CN = ldapadmin,DC = nfa,DC = local「,」P @ ssw0rd「,AuthenticationTypes.SecureSocketsLayer); – user835440
是否有需要打開的端口? – KennyZ
我相信端口是開放的,因爲我可以通過端口636通過adsi編輯器登錄。因此有點沮喪。 – user835440