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.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.ApplyDispatchBehaviormethod. 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.