如何在debuggingASP.NET应用程序时在Fiddler中显示本地主机stream量?

如何在debuggingASP.NET应用程序时在Fiddler中显示localhoststream量?

尝试使用这个:

http://ipv4.fiddler/folder 

代替

 http://localhost/folder 

这也适用于港口

 http://ipv4.fiddler:12345/folder 

这里是链接到提琴手文件

http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/MonitorLocalTraffic

要使用IIS Express在本地主机上工作Fiddler,您应该使用这种forms的URL

 http://localhost.fiddler:50262/ 

这将正确的主机头值(localhost),它符合IIS Express。

开始小提琴手。 转到工具 – >提琴手选项。 select连接选项卡。 检查“使用PAC脚本”选项。

现在您也可以监控本地stream量

对于ASP.NET网站项目:

1)右键单击项目,然后select“属性页”
2)select开始选项
3)在“服务器”部分下,单击“使用自定义服务器”,然后使用计算机名称replace本地主机来编辑基本URL。

监控到本地主机的stream量的最简单方法可能是用“本地主机”replace“本地主机”。 在浏览器的url栏中。 例如

 http://localhost./MyApp/default.aspx 

看看这个链接…'解决方法'是hacky,但它确实工作:

提示在本地主机上使用Fiddler

您可以使用PC主机名而不是127.0.0.1或本地主机

检查“Fiddler选项”中的“使用PAC脚本” – >在公司内部networking中使用IIS Express时,连接正常工作。

确保在您的Fiddler Connections中,localhost不在“IE应该绕过Fiddler for URLs”开头:“框中。

您应该取消选中checkbox:

绕过本地地址的代理服务器

位于Internet Explorer的代理configuration中。

尝试使用http://127.0.0.1 。 < – 注意。 最后

所以你仍然可以连接到卡西尼和debugging很容易(我目前正在debugging页http://127.0.0.1.:1718/login/Default.aspx )。

其中一种可能的解决方法是在IE中删除代理设置,如下所示。

  IE->Tools->Internet Options->Connections->Lan Settings-> 

禁用以下

  • 自动检测设置
  • 使用自动configuration脚本

使用Fiddler v4:

  1. 检查您的IE代理设置

IE->工具 – > Internet选项 – >连接 – >局域网设置

IE Lan设置

  1. 在Fiddler中检查你的设置:

提琴手 – >选项 – >连接和Https

检查Fiddler端口,默认是8888 提琴手端口

  1. 在提琴手菜单:

文件 – >捕获stream量被检查

下面的解决scheme为我工作,当使用一个

  • HttpClient或
  • ASP.NET应用程序中的WebClient。

Web.config文件

 <system.net> <defaultProxy enabled = "true" useDefaultCredentials = "true"> <proxy autoDetect="False" bypassonlocal="False" proxyaddress="http://127.0.0.1:8888" usesystemdefault="False" /> </defaultProxy> 

代码

 var resourceServerUri = new Uri("http://localhost.fiddler:YourAppServicePort"); var body = c.GetStringAsync(new Uri(resourceServerUri)).Result; 

通过自定义Fiddler Rules脚本来检查您的请求是否真的到达了小提琴手

提琴手 – >规则 – >自定义规则

并挂钩到OnBeforeRequest事件中:

 static function OnBeforeRequest(oSession: Session) { if (oSession.hostname.Contains("localhost:YourPortNumber") { System.Windows.Forms.MessageBox.Show(oSession.hostname); } 

或者明确地通过设置一个Web代理

 WebClient wc = new WebClient(); WebProxy proxy = new WebProxy(); // try one of these URIs proxy.Address = new Uri("http://127.0.0.1:8888"); proxy.Address = new Uri("http://hostname:8888"); proxy.Address = new Uri("http://localhost.fiddler"); proxy.Address = new Uri("http://ipv4.fiddler"); // https://en.wikipedia.org/wiki/IPv6 proxy.Address = new Uri("http://ipv6.fiddler"); proxy.BypassProxyOnLocal = false; wc.Proxy = proxy; var b = wc.DownloadString(new Uri(YourResourceServerBaseAddress)); 

如果试图使用Fiddler从BizTalk本地计算机上捕获HTTPS通信,请尝试使用WCF适配器代理设置。 我用了一个地址: http://localhost:8888/