简体   繁体   English

无法在 Fiddler 中显示 netTcpBinding 请求

[英]Can't get netTcpBinding requests to show up in Fiddler

I have a WCF service that has two endpoints.我有一个具有两个端点的 WCF 服务。 One with basicHttpBinding and one with netTcpBinding.一种使用 basicHttpBinding,另一种使用 netTcpBinding。 Here is my config...这是我的配置...

<services>
      <service name="SomeService.Service">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration=""
          name="EndPointHttp" contract="SomeService.IService" />
        <endpoint address="" binding="netTcpBinding" bindingConfiguration=""
          name="EndPointTcp" contract="SomeService.IService" />
        </service>
</services>

However, when I consume the service I am trying to compare the difference between to two requests.但是,当我使用该服务时,我试图比较两个请求之间的差异。 So I am running fiddler to do this.所以我正在运行提琴手来做到这一点。 I can see the basicHttpBinding requests in Fiddler but I can't get the net.tcp:// requests to show up.我可以在 Fiddler 中看到 basicHttpBinding 请求,但无法显示 net.tcp:// 请求。 What can I do to see this traffic?我该怎么做才能看到这种流量?

Fiddler is a HTTP proxy, so it will only capture requests which use HTTP protocol - it will not capture requests made using socket directly. Fiddler 是一个HTTP代理,因此它只会捕获使用 HTTP 协议的请求 - 它不会直接捕获使用套接字发出的请求。 You can use the Network Monitor or some other low-level capture tool to do that, but the interface is not as nice as the one you may be used to with Fiddler.您可以使用网络监视器或其他一些低级捕获工具来执行此操作,但界面不如您习惯使用 Fiddler 的界面好。

Also, as pointed out in another answer by Ladislav Mrnka, you'll be looking at the binary bytes for the .NET Message Framing and the binary XML encoding , so unless you're familiar with them most of the capture will look like gibberish.此外,正如 Ladislav Mrnka 在另一个答案中指出的那样,您将查看.NET 消息帧二进制 XML 编码的二进制字节,因此除非您熟悉它们,否则大多数捕获看起来都是胡言乱语。

Fiddler is HTTP sniffer not TCP sniffer.提琴手是 HTTP 嗅探器而不是 TCP 嗅探器。 You can see only HTTP and HTTPS communication in fiddler.在 fiddler 中只能看到 HTTP 和 HTTPS 通信。 If you want to see messages passed over TCP you must use another tool working on lower level.如果您想查看通过 TCP 传递的消息,您必须使用另一个在较低级别工作的工具。 For example WireShark but be prepared that you will see only some binary data.例如 WireShark,但要做好准备,您只会看到一些二进制数据。

Fiddler is an HTTP debugger. Fiddler 是一个HTTP调试器。 If you're not using HTTP, such as with a netTcpBinding, you won't be able to capture traffic with it.如果您不使用 HTTP,例如使用 netTcpBinding,您将无法使用它捕获流量。 You could try Wireshark or something similar.您可以尝试Wireshark或类似的东西。

If you are interested into how the actual messages look like then try using Service Trace.如果您对实际消息的外观感兴趣,请尝试使用 Service Trace。

https://msdn.microsoft.com/en-us/library/ms732023%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396 https://msdn.microsoft.com/en-us/library/ms732023%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM