问题描述
我正在为我们的应用程序测试某些代理设置,但是我需要测试需要Windows身份验证(或网络凭据)的代理.
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;
当前,我在启用 Require Proxy Authentication
规则的情况下使用Fiddler.如何配置Fiddler,以便可以使用Windows凭据代替默认的"1"/"1"凭据?
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?
推荐答案
在Fiddler 4.6中,我可以在Composer-> Options下打开自动身份验证".然后成功调用了使用Windows身份验证在IIS中托管的WebAPI.您可以在一个通话记录中看到三个请求.
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.
-
HTTP/1.1 401未经授权缓存控制:私有内容类型:text/html;字符集= utf-8服务器:Microsoft-IIS/10.0WWW认证:协商WWW身份验证:NTLM
HTTP/1.1 401未经授权内容类型:text/html;字符集= us-ascii伺服器:Microsoft-HTTPAPI/2.0WWW认证:协商oYIBDTCCAQ ...日期:2016年1月18日星期一09:38:22 GMT内容长度:341
HTTP/1.1 200 OK内容类型:application/json;字符集= utf-8过期:-1服务器:Microsoft-IIS/10.0X-AspNet版本:4.0.30319持久验证:trueWWW-Authentate:协商oRsw ...日期:2016年1月18日星期一09:38:22 GMT内容长度:4
这篇关于在Windows身份验证中使用提琴手的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!