开发者

Connecting to NTLM/LDAP on local machine on workgroup

I am very new to NTLM/LDAP and trying to authenticate using NTML running on a local machine. The code provided by Microsoft ( http://support.microsoft.com/kb/326340/en-us ) seems to work, I just do not know how to connect to it.

I know that the authentication service is running because Contos 8 has been set up to authenticate using NTLM and it is working. I just do not know what the "connection string" should be:

I am trying: LDAP://CN=machinename with no luck.

Dim adAuth As LdapAuthentication = New LdapAuthentication("LDAP://CN=LOCALMACHINENAME")
Dim entry As DirectoryEntry = New DirectoryEntry(_path, domainAndUsername, pwd)

Sugge开发者_开发技巧stions?


In .NET 3.5 you can authenticate against a domain or machine using PrincipalContext.ValidateCredentials.

Dim result as Boolean
Using context As New PrincipalContext( ContextType.Machine, Nothing )
    result = context.ValidateCredentials( username, password )
End Using
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜