Microsoft KB Archive/307272

= How To Trace ServerXMLHTTP Calls Using the Winhttptracecfg Tracing Tool in XML =

Article ID: 307272

Article Last Modified on 1/12/2005

-

APPLIES TO


 * Microsoft XML Core Services 4.0

-



This article was previously published under Q307272





IN THIS TASK

 * SUMMARY
 * Download and Install the User Interface For Winhttptracecfg
 * Run the Trace and Obtain Information
 * Configuration Options
 * Troubleshooting
 * REFERENCES



SUMMARY
This step-by-step article describes how to use the Winhttptracecfg tool to configure tracing features that are built into WinHTTP 5.0. This article also provides a user interface that you can use if you want to use Winhttptracecfg from a command line prompt.

back to the top

Download and Install the User Interface For Winhttptracecfg
 Download and install the MSXML 4.0 parser from the following Microsoft Developer Network (MSDN) Web site:

http://msdn.microsoft.com/xml

 Download Winhttptracecfg.exe from the Microsoft Download Center: The following file is available for download from the Microsoft Download Center:

Download the Winhttptracecfgui.exe package now. Release Date: June 11, 2003

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. The Winhttptracecfgui.exe file contains the following items:  Winhttptrace.ocx Serverxmlhttptrace.htm

When you are prompted, click Save As and select the folder in which you want to save the file. Make sure that you save the tool in the same folder in which you want to save the user interface. Decompress the files and save them in the same folder in which you saved Winhttptracecfgui.exe. Note that the user interface does not work if the .ocx file is not saved in the same folder as Winhttptracecfgui.exe.</li> To register the .ocx file, click Run on the Start menu and type regsvr32  /winhttptrace.ocx, where   is the path to the folder that contains Winhttptrace.ocx.

NOTE: If the path to the file contains spaces, the path that includes the .ocx file must be enclosed in quotation marks (&quot;).</li></ol>

back to the top

Run the Trace and Obtain Information

 * 1) Load Serverxmlhttptrace.htm into a browser.
 * 2) Configure the trace as desired. For more information on configuration options, see the &quot;Configuration Options&quot; section.
 * 3) Click START Tracing.
 * 4) Restart IIS.
 * 5) To stop the trace, click STOP Tracing.

When the trace is made, it is saved in the folder that you have specified, with the prefix that you have specified.

The following can be found in the log, depending on how the trace is configured:
 * The time stamp that is located on the left of the log helps to determine elements such as time to resolve, time to send, time to receive, and so on.
 * The resolved server name indicates that WinHTTP was able to find that server. Note that this does not mean that the page is available. This is a basic Domain Name System (DNS) resolution and simple ping.
 * Sections that start with &quot;Sending Data&quot; indicate that the WinHTTP tool is sending information to the specified URL. These sections contain the amount of bytes that are sent, header information, and body information. The way in which the data is logged depends on whether you are tracing with HEX or ASCII.
 * Sections that start with &quot;Receiving Data&quot; indicate that the WinHTTP tool is receiving data from the specified URL. These sections contain the amount of bytes that are sent, header information, and body information. The way in which the data is logged depends on whether you are tracing with HEX or ASCII.
 * If API tracing is selected, you see additional information for each section, such as the resolving of the URL and the reading of the return stream when the request is finished.

back to the top

Configuration Options
 Output to Log File: This option allows you to output the trace to a log file. You can specify the folder and the prefix of the file. If no folder is specified, the log file is written to the folder that contains the Winhttp5.dll file (usually the System or System32 folder). If the folder is specified, the log file is written to that folder. If you decide to add a prefix, the file is created in the default folder or the specified folder, and has the following format:

 - . .log

</li> Output to Debugger: This option specifies whether the trace output is displayed in a debugger.</li> Enable API Tracing: This option specifies whether top-level function calls are recorded in the trace.</li> Show information in selected format: This option specifies how network traffic (such as requests and responses) is displayed.</li> Maximum Log File Size: This option specifies the maximum size, in bytes, of a log file that is generated by the tracing facility. If specified, the minimum value is 65535 bytes. If a log file reaches the maximum size, the contents of the file are erased. Trace information continues to be written to the log file.</li></ul>

back to the top

Troubleshooting
 If the trace does not take the new settings that you have selected, make sure that you restart IIS after you change configurations.</li> If the .ocx file does not appear in the browser window, make sure that you have registered the control.</li> If the browser window is empty even after you have registered the trace, make sure that the following files are installed on your computer:

These files are required for the ActiveX control to work. To obtain these files, see the following Microsoft Web site:

DLL Help Database

http://support.microsoft.com/dllhelp

</li></ul>

back to the top

<div class="references_section">