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.
Asked
Active
Viewed 329 times
1 Answers
1
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.

Shai Aharoni
- 1,955
- 13
- 25
-
But I need to determine the cause of the fault in the code immediately after the exception is received. – Captain O. Feb 04 '13 at 13:43
-
Could you give more information about the CommunicationException that you get? stacktrace, inner exception etc. – Shai Aharoni Feb 04 '13 at 13:52