Making a web request to a web page which requires windows authentication

You should use Credentials property to pass the windows credentials to the web service.

If you wish to pass current windows user’s credentials to the service then

request.Credentials = CredentialCache.DefaultCredentials;

should do the trick. Otherwise use NetworkCredential as follows:

request.Credentials = new NetworkCredential(user, pwd, domain);

Leave a Comment