WCF - Inspect the messages being sent/received?

后端 未结 6 1745
难免孤独
难免孤独 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条回答
  •  天命终不由人
    2020-12-13 04:46

    In WCF we can use another way to see actual SOAP messages - custom MessageEncoder - a low-level pipeline extensibility point. Unlike message inspectors (IDispatchMessageInspector / IClientMessageInspector) it sees original byte content including any malformed XML data. You need to wrap a standard textMessageEncoding as custom binding element and adjust config file to use that custom binding.

    Also you can see as example how I did it in my project - wrapping textMessageEncoding, logging encoder, custom binding element and config.

提交回复
热议问题