Saturday, July 2, 2011

WCF error. The underlying connection was closed: The connection was closed unexpectedly.

To trace the root of cause of that generic error more easily, put this in your WCF's web.config

<system.diagnostics>
  <sources>
    <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
      <listeners>
        <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "c:\_Misc\traces.svclog" />
      </listeners>
    </source>
  </sources>
</system.diagnostics>

Then double-click the traces.svclog in C:\_Misc folder

No comments:

Post a Comment