Authentication Types when switching from System.DirectoryServices to DirectoryServices.Protocols

孤街浪徒 提交于 2019-12-04 12:54:01

It looks like you were on the right track.

After doing some research, I was able to map almost all of the AuthenticationTypes values:

None: AuthType.Basic

Secure: AuthType.Negotiate

Anonymous: AuthType.Anonymous

Signing: LdapSessionOptions.Signing

Sealing: LdapSessionOptions.Sealing

SecureSocketLayer: LdapSessionOptions.SecureSocketLayer

Encryption: Same value as SecureSocketLayer

ReadonlyServer: LdapSessionOptions.LocatorFlag.WriteableRequired = false

Serverbind: Use one of the LdapDirectoryIdentifier constructors that has the fullyQualifiedDnsHostName argument, with the value set to true.

FastBind: Doesn't apply, since this S.DS.P works at a lower level.

Delegation: No corresponding setting found. It could be that delegation is implicit. One way to test would be to convert the code on this page and see if it works.

Be aware that not all non-AD servers will support AuthType.Negotiate, since it is Windows specific. There are several other things (like some of the LocatorFlag values) that will also not mean anything for non-AD systems. Thus, take care when converting code that assumed AD connectivity, since some assumptions will no longer be safe.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!