Is there there 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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With