Enabling Logging of Web Service Errors

Occasionally the web overview logs will not provide enough detail when troubleshooting issues. In these cases it can be helpful to enable lower level Web Service logging. Please follow the steps detailed below to enable logging of low level Web Service errors.

Steps to Enable Logging

  1. Locate the Discovery Center Web.config file, which is normally found in C:\inetpub\wwwroot\AN40Web\
  2. Backup this file before making the changes described below. When troubleshooting is complete, we will need to restore the config back to the original file.
  3. Open the web.config file within a text editor
  4. Add the following XML fragment after the configSections element of the web.config file. Edit the highlighted filenames to set a suitable location for your server, and ensure that the user account running the Discovery Center application pool has access to the specified location.
    <system.diagnostics>
    <sources>
    <source name='System.ServiceModel.MessageLogging' switchValue='Warning, ActivityTracing'>
    <listeners>
    <add type='System.Diagnostics.DefaultTraceListener' name='Default'>
    <filter type='' />
    </add>
    <add name='ServiceModelMessageLoggingListener'>
    <filter type='' />
    </add>
    </listeners>
    </source>
    <source name='System.ServiceModel' switchValue='Warning, ActivityTracing' propagateActivity='true'>
    <listeners>
    <add type='System.Diagnostics.DefaultTraceListener' name='Default'>
    <filter type='' />
    </add>
    <add name='ServiceModelTraceListener'>
    <filter type='' />
    </add>
    </listeners>
    </source>
    </sources>
    <sharedListeners>
    <add initializeData='C:\temp\Web_messages.svclog'
    type='System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    name='ServiceModelMessageLoggingListener' traceOutputOptions='Timestamp'>
    <filter type='' />
    </add>
    <add initializeData='C:\temp\Web_tracelog.svclog'
    type='System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    name='ServiceModelTraceListener' traceOutputOptions='Timestamp'>
    <filter type='' />
    </add>
    </sharedListeners>
    <trace autoflush='true' />
    </system.diagnostics>
  5. Find the system.serviceModel element of the config file and add this XML fragment within it:
    <diagnostics>
    <messageLogging logEntireMessage='true'
    maxMessagesToLog='300'
    logMessagesAtServiceLevel='true'
    logMalformedMessages='true'
    logMessagesAtTransportLevel='true' />
    </diagnostics>
  6. Once these changes are made, the specified log files will be created when interacting with the web services offered by Discovery Center. These logs can be inspected with the Microsoft Service Trace Viewer tool, or sent to Active Navigation support staff for review.
  7. When you have finished investigating service operation, ensure that the original configuration is restored to avoid generating large log files in normal operation of the system.