I have enabled tracing in a WCF service. Here is the system.diagnostics section:
<configuration>
<system.diagnostics>
<trace autoflush="true"/>
<sources>
<source name="System.ServiceModel" switchValue="All" propagateActivity="true">
<listeners>
<add name="xmlTraceListener" />
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging" switchValue="All">
<listeners>
<add name="xmlTraceListener" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xmlTraceListener"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData="C:\KryptonTracing\Traces.svclog" />
</sharedListeners>
</system.diagnostics>
Here is the system.serviceModel section showing diagnostics only:
<diagnostics wmiProviderEnabled="true">
<messageLogging
logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog="3000"
/>
</diagnostics>
When I publish the service I see an Information event in the Windows Event Viewer on the server saying the following:
Message Logging has been turned on. Sensitive information may be logged in the clear, even if it was encrypted on the wire: for example, message bodies.
When I go to the C:\KryptonTracing folder on the server there is no Traces.svclog generated. I have gone into IIS and looked at the app pool identity this WCF service is running under and given that identity full control over the folder.. still nothing. No matter what I do I can't get anything to create a Traces.svclog. FYI, this service is wsHttpBinding (SSL) with custom authentication, but that should not matter.
I have tried everything in this post to no avail. Please help.