WCF - Inspect the messages being sent/received?

后端 未结 6 1742
难免孤独
难免孤独 2020-12-13 03:51

I have 2 solutions: - Server Solution - Client Solution

The server registers itself to my localhost IIS: http://localhost/MyApp/

The client adds WCF Servic

6条回答
  •  -上瘾入骨i
    2020-12-13 04:28

    Maybe I'm missing something, but... Why don't you use the WCF tracing features? It's a fantastic troubleshooting tool. I've used it for services hosted in IIS/WAS also.

    Enabling WCF Tracing

    BTW, some people don't know it, but you can open traces from server side and client side at the same time, and the Viewer will show you the correlation between the server and client actions in a nice graph.

    EDIT: whenever I had to capture TCP/IP traffic, I use WireShark. If you need to do it programatically you can use SharpPCAP, so I can take actions upon what I capture from the network. But for troubleshooting, much much better to rely on WCF Tracing.

提交回复
热议问题