How to enable FIM Service Management Agent Tracing

How to enable FIM Service Management Agent Tracing



OVERVIEW


This document will provide the steps necessary to work enable FIM Service Management Agent Tracing. FIM Service Management Agent Tracing is an advanced way of troubleshooting issues concerning the FIM Service Management Agent.  FIM Service Management Agent Tracing is enabled/disabled via the Synchronization Service Engine Configuration File ( %programfiles%\Microsoft Forefront Identity Manager\2010\Synchronization Service\miiserver.exe.config ). 

STEPS TO ENABLE TRACING


  1. Prior to making any changes to this file, it is very important to make a backup copy of this file. You can do this by very simply copying, and pasting the file in the same directory, or placed into a backup directory.
  2. Once you have made the backup copy of the Synchronization Service Configuration File, then let's edit the Synchronization Service Configuration File.
    1. *NOTE* You can use editors such as Notepad, Visual Studio, or any text file editor.
  3. Set the log file location

    1. In this wiki, we will be using "C:\Logs" as the place to put our log files. By default, "C:\Logs does not exist. If you do not have a "C:\Logs" folder, then please create one at this time.
      1. The FIM Synchronization Service Account must have access to the folder that you are placing the trace files.
  4. In the Synchronization Service Configuration File, look for the </startup> tag.  If you have a default Synchronization Service Configuration File, then you will see the <runtime> tag right underneth the </startup> tag.
  5. Insert the below text between the </startup> tag and the <runtime> tag.
  6. <system.diagnostics>
            <sources>
                <source name="System.ServiceModel" switchValue="Verbose,ActivityTracing"
                 propagateActivity="true">
                    <listeners>
                        <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                            <filter type="" />
                        </add>
                        <add name="ServiceModelTraceListener">
                            <filter type="" />
                        </add>
                    </listeners>
                </source>
                <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="Microsoft.ResourceManagement" switchValue="Verbose,ActivityTracing">
                    <listeners>
                        <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                            <filter type="" />
                        </add>
                        <add name="ServiceModelMessageLoggingListener">
                            <filter type="" />
                        </add>
                        <add name="ServiceModelTraceListener">
                            <filter type="" />
                        </add>
                        <add name="text" />
                    </listeners>
                </source>
            </sources>
            <sharedListeners>
                <add initializeData="C:\logs\miiserver_tracelog.svclog"
                 type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                 name="ServiceModelTraceListener" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack">
                    <filter type="" />
                </add>
                <add initializeData="C:\logs\miiserver_messages.svclog"
                 type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                 name="ServiceModelMessageLoggingListener" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack">
                    <filter type="" />
                </add>
                <add name="text"
                  type="System.Diagnostics.TextWriterTraceListener"
                  initializeData="C:\logs\TextWriterOutput.log" traceOutputOptions="DateTime, ThreadId" />
            </sharedListeners>
            <trace autoflush="true" />
        </system.diagnostics>

  7. Save the Synchronization Service Configuration File
  8. Stop and Start the FIM Synchronization Service

DISABLE TRACING


If you made the backup copy of the Synchronization Service Configuration File, then you can rename the tracing file to miiserver.exe.config._TracingEnabled.  Once you do that, then rename the backup copy back to miiserver.exe.config.  If you do this, then you should be able to easily toggle back forth to enable/disable tracing.

Anytime you change the Synchronization Service Configuration File, then you will need to restart the FIM Synchronization Service.

ADDITIONAL FIM TRACING ARTICLES

How to enable FIM Service Tracing
How to configure FIM Portal Tracing

Enable Tracing and Viewing Trace Logs
Enable Verbose Tracing for the FIM Portal

SEE ALSO

Current Forefront Identity Manager 2010 Resources
Current Certificate Lifecycle Manager Resources
GalSync Resource Wiki
PCNS-Password Synchronization Wiki
Self-Service Password Reset (SSPR) Resources
Leave a Comment
  • Please add 6 and 6 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Tim Macaulay edited Revision 2. Comment: added the link for enable verbose tracing for the FIM Portal

Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Tim Macaulay edited Revision 2. Comment: added the link for enable verbose tracing for the FIM Portal

  • If you are going ti use code in your articles, please use the button 'Format code' which you can find in editor's toolbar

Page 1 of 1 (2 items)