Reputation: 4785
I creaed the sample service in wcf and also successfully used the web service in the sample application. Now I just want to log the request/response to/from the WCF service.Please help.
Upvotes: 1
Views: 1255
Reputation: 69250
There is built in tracing functionality in WCF that can be used to log the requests and responses. The logs are viewed with the Service Trace Viewer Tool. On that page there is also a description on how to configure your service for logging.
If you need to hook up your own code to execute when a call is made, you can do that through ServiceBehaviours and the IServiceBehavior.ApplyDispatchBehavior
method. The latter is a quite advanced method though, so I only recommend it if you have found out that you need more that the built in tracing can give.
Upvotes: 1