none
WCF 4.5 doesn't generate log file RRS feed

  • Question

  • Hi,

    Recently, I am using WCF 4.5 windows 7 for my testing of WCF appliation. When enable tracing, the WCF servce works fine, however, the WCF application doesn't generate the log file( web_messages.svclog or web_tracelog.svclog).

    Here are the configuration of the web.confi

    g file:

        <system.diagnostics>
            <sources>
                <source name="System.ServiceModel.MessageLogging" switchValue="警告,ActivityTracing">
                    <listeners>
                        <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                            <filter type="" />
                        </add>
                        <add name="ServiceModelMessageLoggingListener">
                            <filter type="" />
                        </add>
                    </listeners>
                </source>
                <source propagateActivity="true" name="System.ServiceModel" switchValue="详细,ActivityTracing">
                    <listeners>
                        <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                            <filter type="" />
                        </add>
                        <add name="ServiceModelTraceListener">
                            <filter type="" />
                        </add>
                    </listeners>
                </source>
            </sources>
            <sharedListeners>
                <add initializeData="e:\project\test\wcf_tutorial\webapp_consume_wcf\webapp_consume_wcf\web_messages.svclog"
                    type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                    name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
                    <filter type="" />
                </add>
                <add initializeData="e:\project\test\wcf_tutorial\webapp_consume_wcf\webapp_consume_wcf\web_tracelog.svclog"
                    type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                    name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
                    <filter type="" />
                </add>
            </sharedListeners>
            <trace autoflush="true" />
        </system.diagnostics>
    
    
    <system.serviceModel>
          <serviceHostingEnvironment aspNetCompatibilityEnabled="true"></serviceHostingEnvironment>
            <diagnostics wmiProviderEnabled="true" performanceCounters="All">
                <messageLogging logEntireMessage="true" logMalformedMessages="true"
                    logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
            </diagnostics>
          <serviceHostingEnvironment aspNetCompatibilityEnabled="true"></serviceHostingEnvironment>
            <diagnostics wmiProviderEnabled="true" performanceCounters="All">
                <messageLogging logEntireMessage="true" logMalformedMessages="true"
                    logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
            </diagnostics>
    </system.serviceModel>
    Regards

    Wednesday, April 29, 2015 5:00 AM

Answers