Logging WCF errors en debug info

I was getting data from a windows communication foundation (WCF) service in my Silverlight 4 application.

Deploying on the server didn’t work at once, of course.

The Silverlight messages indicated there was something going wrong server side, so i figured it was something with my data (wcf) service.

But what exactly was going wrong?

Then i read about WCF logging: add the following code to your web.config (dont’ forget to alter the path to one on your own disk) and voila, logging was ready!

       <add name="WcfListener"  
               initializeData="c:\logs\wcfLog.svclog"  />  
       <!-- switchValue attribute has no impact on MessageLogging -->  
       <source name="System.ServiceModel.MessageLogging"> 
            <add name="WcfListener" /> 
        <source name="System.ServiceModel" 
                      switchValue="Warning, ActivityTracing" 
                      propagateActivity="true" > 
            <add name="WcfListener" /> 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s