The following steps detail enabling AD RMS debug tracing on the RMS server. This logging captures the additional traffic generate when the Active Directory Rights Management Services Mobile Device Extension (MDE) is installed. The logging specified in this document may be used instead of the standard AD RMS server side tracing.

Steps to enable tracing

Please see the Screenshots and Links sections below for details and/or additional information on the following steps.

  1. Make two copies of the .NET v4 machine.config files
    1. This is done in both the Framework and Framework64 locations.
      • C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
      • C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
    2. One copy is named "machine - Debug.config" and the other "machine - Original.config" in each location.
  2. Edit the "machine - Debug.config" files adding the tracing functionality.
  3. Replace the existing machine.config file. Perform this task in both the Framework and Framework64 directory locations
    1. Delete the existing machine.config file.
    2. Copy and paste a copy of the edited "machine - Debug.config" file.
    3. Rename this new copy of the debug file to "machine.config".
  4. Restart IIS (e.g. run "iisreset" from an elevated command prompt).
  5. Use Debug View (from SysInternals) to capture the debug output.

Adding the tracing tags

Enabling the tracing functionality requires adding a system.diagnostics secion immediatly following the system.data section. The following block contains the content to add in the "machine - Debug.config" file.

<system.diagnostics>
  <switches>
    <add name="TMS Trace" value="4" />
  </switches>
</system.diagnostics>

Capturing the data

  1. Download DebugView and save to the desktop on the AD RMS server (http://live.sysinternals.com/tools/dbgview.exe).
  2. Start Debug View (run as administrator).
  3. Under the Capture menu select Capture Global Win32.
  4. Reproduce the issue and stop capturing data.

Steps to disable tracing

  1. Replace the existing (debug enabled version) machine.config file. Perform this task in both the Framework and Framework64 directory locations
    1. Delete the existing machine.config file.
    2. Copy and paste a copy of the edited "machine - Orignal.config" file.
    3. Rename this new copy of the original file to "machine.config".
  2. Restart IIS (e.g. run "iisreset" from an elevated command prompt).

Screenshots

Machine.config files

Both Framework and Framework64 file locations after creating the necessary copies of the machine.config files.

Editing the "machine - Debug.config" files

Where to add the system.diagnostics tag.

After the system.diagnostics section is added.

Using Debug View

Configure the Global Win32 option.

Button to disable capturing once data gathering completes.

Sample of logging output

Links