Captain O.
Captain O.

Reputation: 383

WCF CommunicationException: understanding the root cause

I am writing an application that connects to the WCF service. When I receive CommunicationException on the client side I need to understand whether the problem is on the service side or due to the invalid client configuration.

Upvotes: 0

Views: 336

Answers (1)

Shai Aharoni
Shai Aharoni

Reputation: 1957

You can add the following section to your WCF host config file:

<system.diagnostics>
        <sources>
            <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
                <listeners>
                    <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="logs\WCFLog.svclog"/>
                </listeners>
            </source>
        </sources>
    </system.diagnostics>

this will create an svclog file which can give you more information about the cause of the connection problem.

Upvotes: 1

Related Questions