Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

NTLM and Kerberos Authentication

Default NTLM authentication and Kerberos authentication use the Microsoft Windows NT user credentials associated with the calling application to attempt authentication with the server. When using non-default NTLM authentication, the application sets the authentication type to NTLM and uses a NetworkCredential object to pass the user name, password, and domain to the host, as shown in the following example.

String MyURI = "http://www.contoso.com/";
WebRequest WReq = WebRequest.Create (MyURI);
WReq.Credentials = 
    new NetworkCredential(UserName, SecurelyStoredPassword, Domain);

Applications that need to connect to Internet services using the credentials of the application user can do so with the user's default credentials, as shown in the following example.

String MyURI = "http://www.contoso.com/";
WebRequest WReq = WebRequest.Create (MyURI);
WReq.Credentials = CredentialCache.DefaultCredentials;

The negotiate authentication module determines whether the remote server is using NTLM or Kerberos authentication, and sends the appropriate response.

NoteNote

NTLM authentication does not work through a proxy server.

Show:
© 2015 Microsoft