Reputation: 383
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
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