Showing posts with label WCF Service debuging technique from client. Show all posts
Showing posts with label WCF Service debuging technique from client. Show all posts

Tuesday, April 26, 2011

WCF Service debuging technique from client

While implementing any WCF service in any client application, you may find lots of issue, here i share some experience how you can get to know whats going wrong at service end!




You just need to turn on Tracing and Messging on WCF server





As a result you see the following set of tags has been added in your web config file.

< system.diagnostics >
< sources >
< source name="System.ServiceModel" switchValue="Warning, ActivityTracing"
propagateActivity="true" >
< listeners >
< add type="System.Diagnostics.DefaultTraceListener" name="Default" >
< filter type="" / >
< /add >
< add name="ServiceModelTraceListener" >
< filter type="" / >
< /add >
< /listeners >
< /source >
< source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing" >
< listeners >
< add type="System.Diagnostics.DefaultTraceListener" name="Default" >
< filter type="" / >
< /add >
< add name="ServiceModelMessageLoggingListener" >
< filter type="" / >
< /add >
< /listeners >
< /source >
< /sources >
< sharedListeners >
< add initializeData="F:\MyWCFFolder\Web_tracelog.svclog"
type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelTraceListener" traceOutputOptions="Timestamp" >
< filter type="" / >
< /add >
< add initializeData="F:\MyWCFFolder\Web_messages.svclog"
type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp" >
< filter type="" / >
< /add >
< /sharedListeners >
< /system.diagnostics >