I have set up fiddler as a proxy server requiring authentication following these instructions.

When I explicitly set the credentials I've set in Fiddler in my HttpClientHandler:

this.Proxy = WebRequest.DefaultWebProxy;
this.Proxy.Credentials = new NetworkCredential("sweet name", "sweet password");

Then in Fiddler I get 2 http requests, a 407 and an automatic 200, and the request succeeds:

407 and 200 response

However, when I try use the default credentials:

this.Proxy = WebRequest.DefaultWebProxy;
this.Proxy.Credentials = CredentialCache.DefaultCredentials;

Then in Fiddler I only get one request, a 407, and the request fails:

enter image description here

Why is there no automatic retry with the default credentials like there is when I explicitly set the proxy credentials?

1

There are 1 answers

0
Felix On BEST ANSWER

As pointed out by @Robert in a comment, the documentation says:

The DefaultCredentials property applies only to NTLM, negotiate, and Kerberos-based authentication.

Hence it makes sense that there is no automatic second http request following a 407 response when the proxy uses basic authentication.