开发者

log soap request and response from Wcf web service to a text file using log4net

Is there ther开发者_运维知识库e any simple way of getting a WCF Service to log SOAP requests and responses to a text file.

I want to log the messages on server, just to clarify.


If you can change the service code to add a behavior, you can hook up an IDispatchMessageInspector and use whichever logging framework to log at the messages there. You can also look at the WCF Message Logging feature, which uses the System.Diagnostic framework to perform the logging (I haven't used log4net yet, maybe they have some trace listener which can be used for this as well).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜