Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am testing some proxy settings for our application but I need to test a proxy that requires Windows Authentication (or network credentials).

For testing, I assigned the credential of the proxy to the network credentials

System.Net.WebProxy proxy = new System.Net.WebProxy("127.0.0.1", 8888);
proxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
//proxy.Credentials = new System.Net.NetworkCredential("1", "1");
System.Net.WebRequest.DefaultWebProxy = proxy;

Currently, I use Fiddler with the Require Proxy Authentication rule turned on. How can I configure Fiddler so I can use the Windows credentials instead of the default "1" / "1" credentials?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
471 views
Welcome To Ask or Share your Answers For Others

1 Answer

In Fiddler 4.6 I can turn on "Automatically Authenticate" under Composer -> Options. My WebAPI hosted in IIS using Windows Authentication is then successfully called. You can see three requests in the log for a single call.

  1. HTTP/1.1 401 Unauthorized Cache-Control: private Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/10.0 WWW-Authenticate: Negotiate WWW-Authenticate: NTLM

  2. HTTP/1.1 401 Unauthorized Content-Type: text/html; charset=us-ascii Server: Microsoft-HTTPAPI/2.0 WWW-Authenticate: Negotiate oYIBDTCCAQ... Date: Mon, 18 Jan 2016 09:38:22 GMT Content-Length: 341

  3. HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Expires: -1 Server: Microsoft-IIS/10.0 X-AspNet-Version: 4.0.30319 Persistent-Auth: true WWW-Authenticate: Negotiate oRsw... Date: Mon, 18 Jan 2016 09:38:22 GMT Content-Length: 4


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...