一种方法可以配置Fiddler拦截来自Windows服务的HTT

一种方法可以配置Fiddler拦截来自Windows服务的HTT

本文介绍了有没有一种方法可以配置Fiddler拦截来自Windows服务的HTTP调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在替换用VS2005构建的旧的Windows服务应用程序(超过5年),该应用程序可以进行HTTP GET调用.有很多事情使此操作变得困难(例如,Web服务器位于客户的网络上,我们无法直接连接到该服务器),但是,不幸的是,我们不希望关闭正在运行的系统以将其替换为WinForm....................................................................................................................................................... Fiddler可以监视的版本.新代码似乎可以正确执行所有操作,但是,遗憾的是,它无法通过身份验证.

We're in the process of replacing an old (5+ years) Windows service application built with VS2005 that makes an HTTP GET call. There are several things that make this difficult (such as the web server is on the customer's network and we can't connect directly to it) and, unfortunately, we'd prefer not to take down the running system to replace it with a WinForm version that can be monitored by Fiddler. The new code appears to be doing everything correctly, but, alas, it is failing to authenticate.

是否可以配置Fiddler(2.2.9.1)来拦截Windows服务的HTTP调用?

Is there a way to configure Fiddler (2.2.9.1) to intercept HTTP calls from a Windows service?

推荐答案

Codeka提供了一条线索,可以使我朝正确的方向前进.仍然缺少的是如何配置代理. <appname>.exe.config需要添加类似于以下内容的部分:

Codeka provided a clue to get me going in the right direction. The piece that was still missing was how to get the proxy configured. The <appname>.exe.config needed to have a section like the following added:

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

完成此操作后,Windows服务的http流量便开始流经Fiddler.

Once this was done the Windows service's http traffic started flowing through Fiddler.

这篇关于有没有一种方法可以配置Fiddler拦截来自Windows服务的HTTP调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 15:47