如何使用 Fiddler 监控 WCF 服务 [英] How to use Fiddler to monitor WCF service

查看:24
本文介绍了如何使用 Fiddler 监控 WCF 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 WCF 服务,它接受复杂类型并返回一些数据.我想使用 Fiddler 查看对服务的传入请求是什么样的.客户端是使用服务引用代理的 .net 控制台应用程序.这可能与 Fiddler 一起使用吗?我是这个工具的新手,过去只用它来通过请求构建器发布数据.

I have a WCF service that accepts a complex type and returns some data. I want to use Fiddler to see what the incoming requests to the service looks like. The client is .net console app which uses a Service reference proxy. Is this possible with Fiddler. I'm new to this tool and have only used it in the past to post data with the request builder.

推荐答案

你需要在你的 web.config 中添加这个

You need to add this in your web.config

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

  1. 然后在 WEBSERVER 机器上启动 Fiddler.
  2. 点击工具 |Fiddler 选项 => 连接 => 将端口调整为 8888.(如果需要,允许远程)
  3. 好的,然后从文件菜单中,捕获流量.

就是这样,但不要忘记在关闭 fiddler 后删除 web.config 行,因为如果不这样做会出错.

That's all, but don't forget to remove the web.config lines after closing the fiddler, because if you don't it will make an error.

参考:http://fiddler2.com/documentation/Configure-Fiddler/Tasks/UseFiddlerAsReverseProxy

这篇关于如何使用 Fiddler 监控 WCF 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆