开发者

IIS basic authentication and Active directory

开发者 https://www.devze.com 2023-03-29 03:19 出处:网络
I am trying to figure out how to set the default domain in IIS when choosing basic authentication. I have an LDAP string but I\'m quite clueless as to how to extract the inform开发者_JS百科ation I nee

I am trying to figure out how to set the default domain in IIS when choosing basic authentication. I have an LDAP string but I'm quite clueless as to how to extract the inform开发者_JS百科ation I need from it for setting the default domain setting.

When I programatically connect to an Active directory I use the string:

DirectoryEntry _entry = new DirectoryEntry ("LDAP://xx.xx.xx.xx/CN=Users,DC=dc1,DC=dc2,DC=dc3", "user", "password");

What information do I need to pull from this string for the default domain setting in IIS?

Any help would be appreciated. Thanks.


Guessing from the (sanitized) LDAP string you gave, your Windows Active Directory domain would be like dc1.dc2.dc3--say if dc1 is "site", dc2 is "company", and dc3 is "net" then the domain is "site.company.net".

Or on a command prompt you could type echo %USERDNSDOMAIN% and see the same thing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号