Enabling Tracing and Viewing Trace Logs
Debugging Forefront Identity Manager (FIM) can be complicated. One of the best ways to debug FIM is to enable tracing.
Enabling Diagnostic Tracing
You can enable diagnostic tracing of FIM by modifying a file named Microsoft.ResourceManagement.Service.config.exe file that is installed by FIM by default. That file includes comments that indicate what lines in the file need to uncommented out to enable diagnostic logging.
After you make changes to the Microsoft.ResourceManagement.Service.config.exe file, save the configuration changes and restart the FIM service.
Viewing Trace Logs
The Windows SDK Service Trace Viewer is a helpful tool for viewing trace logs.
The following guidelines are specific to using the tool with FIM:
When you open a trace file, you might receive an error that is caused by the fact that the XML Trace Source does not write the closing XML tags until FIM closes. You can ignore this warning.
FIM activities have an ID of “000000000” in the Service Trace Viewer. FIM activity tracing is not enabled. The other activities come from Windows Communication Foundation (WCF), and they relate to message transactions.
After you make changes to the Microsoft.ResourceManagement.Service.config.exe file, save the configuration changes and restart the FIM service.
Note
You must modify the Microsoft.ResourceManagement.Service.config.exe file as documented in Enabling Diagnostic Tracing in order for FIM to generate a trace log.
Microsoft.ResourceManagement.Service.config.exe file
The following text is the contents of the Microsoft.ResourceManagement.Service.config.exe file, which is installed by FIM by default.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="resourceManagementClient" type="Microsoft.ResourceManagement.WebServices.Client.ResourceManagementClientSection, Microsoft.ResourceManagement" />
<section name="resourceManagementService" type="Microsoft.ResourceManagement.WebServices.ResourceManagementServiceSection, Microsoft.ResourceManagement.Service" />
</configSections>
<appSettings>
<add key="mailServer" value="https://imtx86-re001/ews/exchange.asmx" />
<add key="isExchange" value="1" />
<add key="sendAsAddress" value="administrator@ilm2ad1.nttest.microsoft.com" />
<add key="synchronizationServerName" value="CSD1837972" />
</appSettings>
<system.serviceModel>
<services>
<service name="Microsoft.ResourceManagement.WebServices.ResourceManagementService">
<host>
<baseAddresses>
<add baseAddress="https://localhost:5725" />
</baseAddresses>
</host>
</service>
<service name="Microsoft.ResourceManagement.WebServices.SecurityTokenService">
<host>
<baseAddresses>
<add baseAddress="https://localhost:5726" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
<resourceManagementClient resourceManagementServiceBaseAddress="csd1837972" />
<resourceManagementService externalHostName="csd1837972" />
<system.diagnostics>
<sources>
<!--
The trace source Microsoft.ResourceManagement has low-level exceptions from the code and is the best way to diagnose complex issues.
Change the switchValue from Error to Verbose to see more information.
-->
<source name="Microsoft.ResourceManagement" switchValue="Error">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default">
<filter type="" />
</add>
<add name="ExceptionEventLogListener" initializeData="Microsoft.ResourceManagement" type="System.Diagnostics.EventLogTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, Callstack">
<filter type="" />
</add>
<!--
Step 1: Uncomment out this line to write diagnostic information to a svclog file.
-->
<!--
<add name="DiagnosticListener">
<filter type="" />
</add>
-->
</listeners>
</source>
</sources>
<sharedListeners>
<!--
Step 2: Uncomment out this listener to write diagnostic information to a svclog file.
-->
<!--
<add initializeData="fimDiagnostics.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="DiagnosticListener" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack">
<filter type="" />
</add>
-->
</sharedListeners>
<!--
Step 3: Uncomment out this line to have svclog written out synchronously without buffering.
This would help not loosing traces immediately preceding service shutdown
and also will help ensuring the output is always well-formed at the possible expense.
of performance.
-->
<!--<trace autoflush="true"/>-->
</system.diagnostics>
</configuration>
See Also
Reference
Windows Communication Foundation Configuration Tool (SvcConfigEditor.exe)