StackOverflow When Using SlSvcUtil.exe

If you are using SlSvcUtil.exe from Silverlight 4 SDK and you get a StackOverflowException, probably it is because of a known bug of the application.
The solution found in the article Workaround for StackOverflowException when using SlSvcUtil.exe is to add a C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Tools\SlSvcUtil.exe.config file with the following content:

<configuration>
  <satelliteassemblies>
    <assembly name="SlSvcUtil, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </satelliteassemblies>
</configuration>

Configuring WCF Tracing

WCF is heavely based on configuration, so it isn't really easy to debug; logging can help developers in understanding what's happening: what calls are made, what exceptions are thrown, and so on.

To enable logging, you have to insert the following lines in the web.config file of the service application (often it's just your web-site):

<system.diagnostics>
  <trace autoflush="true" />
  <sources>
    <source name="System.ServiceModel"
      switchValue="Information, ActivityTracing"
      propagateActivity="true">
      <listeners>
        <add name="sdt"
          type="System.Diagnostics.XmlWriterTraceListener"
          initializeData="C:\Logs\Traces.svclog" />
      </listeners>
    </source>
  </sources>
</system.diagnostics>

Then you can open you *.svclog files with the Service Trace Viewer Tool, found in the local file SvcTraceViewer.exe

More details in the articles Service Trace Viewer Tool (SvcTraceViewer.exe) and Configuring Tracing.