WCF is a great technology, but it is difficult to configure, and often the error messages are cryptic - if in fact you can get it to return exceptions at all.

Fiddler is a great way to debug WCF based services, but even that sometimes doesn't work if you are using the visual studio/cassini based web host.

Fortunately, adding the following code into your web.config file will put any exception information into a log file:

<system.diagnostics>

<sources>

<source name="System.ServiceModel"

switchValue="Information, ActivityTracing"

propagateActivity="true">

<listeners>

<add name="traceListener"

type="System.Diagnostics.XmlWriterTraceListener"

initializeData= "c:tempwcfErrors.svclog" />

</listeners>

</source>

</sources>

</system.diagnostics>


WCF