System.Net SDP package information

Applies to: .NET Framework 3.5 Service Pack 1


The Support Diagnostic Package (SDP) for System.Net is used to configure System.Net tracing on the machine that is experiencing an issue with the System.Net technology. The SDP package will collect a System.Net trace of an application using the System.Net.HttpWebRequest or System.Net.Sockets.Socket class.

While the SDP package will usually take care of enabling the System.Net tracing and disabling the tracing, the trace will need to be manually stopped/ disabled only if the user decides to cancel the SDP package before the SDP package gets a chance to perform the necessary cleanup. But the output trace file needs to be manually deleted. This KB article outlines the steps required to disable System.Net tracing and delete the trace file.

More Information

When System.Net SDP package enables the trace feature, it asks the .NET application configuration file and System.Net output location.

.NET Application Configuration File Selection Dialog box:
.net application configuration file selection

System.Net trace output folder:
System.Net Trace Output Directory

To enable the System.Net trace, the SDP package will have to register following <system.diagnostics> entry into your .NET application configuration file.
The additional trace options include, DateTime, ProcessID, Callstack and Timestamp.

<?xml version="1.0" encoding="UTF-8"?>
      <add name="System.Net" value="Verbose" />
      <add name="System.Net.Sockets" value="Verbose" />
      <add name="System.Net.Cache" value="Verbose" />
      <add name="System.Net.HttpListener" value="Verbose" />
      <source name="System.Net" tracemode="includehex" maxdatasize="1024">
          <add name="System.Net" />
      <source name="System.Net.Sockets" tracemode="includehex" maxdatasize="1024">
          <add name="System.Net" />
      <source name="System.Net.Cache" tracemode="includehex" maxdatasize="1024">
          <add name="System.Net" />
      <source name="System.Net.HttpListener" tracemode="includehex" maxdatasize="1024">
          <add name="System.Net" />
      <add name="System.Net" initializeData="C:\Traces\SNTrace.6-21-12-17-19.log" type="System.Diagnostics.TextWriterTraceListener" traceOutputOptions="DateTime" />
    <trace autoflush="true" />

1. System.Net SDP package will create a backup of the selected configuration file and the existing configuration content will be combined with the new <system.diagnostic> section for System.Net. The backup configuration file name will have the original file name appended with the current date, time and ".sdp.backup". For example: CSharpHTTP.exe.config will be backed up as CSharpHTTP.exe.config.6-21-12-17-19.sdp.backup or web.config will be backed up as web.config.6-21-12-17-19.sdp.backup

To manually disable the System.Net trace feature, you just need to copy the configuration backup file back to the original configuration file name.

2. The SDP package will create a new .NET application configuration file if it does not exist. For this scenario, you can simply remove the .NET application configuration file to disable the System.Net trace feature.

3. Once you restore the original configuration file or remove the trace enabled configuration file, you will have to restart the application process for the changes to be effective. 

4. The trace file will be located in the trace file folder, which you select in SDP dialog box GUI. You will need to manually delete the trace file after disabling the tracing feature. System.Net SDP package will not delete the trace file for you as the file may still be referenced by the .NET application process.


KB 2598970 - Information about the Microsoft Automated Troubleshooting Services and Support Diagnostic Platform

KB 973559 - Frequently asked questions about the Microsoft Support Diagnostic Tool (MSDT) for Windows 7

How to: Configure Network Tracing