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

Article translations Article translations
Article ID: 307272 - View products that this article applies to.
This article was previously published under Q307272
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

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.

Download and Install the User Interface For Winhttptracecfg

  1. Download and install the MSXML 4.0 parser from the following Microsoft Developer Network (MSDN) Web site:
    http://msdn.microsoft.com/xml
  2. Download Winhttptracecfg.exe from the Microsoft Download Center: The following file is available for download from the Microsoft Download Center:
    Collapse this imageExpand this image
    Download
    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.
  3. 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.
  4. To register the .ocx file, click Run on the Start menu and type regsvr32 <pathofocx>/winhttptrace.ocx, where <pathofocx> 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 (").

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 "Configuration Options" 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 "Sending Data" 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 "Receiving Data" 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.

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:
    <prefix>-<application name>.<time>.log
  • Output to Debugger: This option specifies whether the trace output is displayed in a debugger.
  • Enable API Tracing: This option specifies whether top-level function calls are recorded in the trace.
  • Show information in selected format: This option specifies how network traffic (such as requests and responses) is displayed.
  • 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.

Troubleshooting

  • If the trace does not take the new settings that you have selected, make sure that you restart IIS after you change configurations.
  • If the .ocx file does not appear in the browser window, make sure that you have registered the control.
  • If the browser window is empty even after you have registered the trace, make sure that the following files are installed on your computer:
    Collapse this tableExpand this table
    FileLocation
    Msvbvm60.dllC:\WINNT\System32 or C:\Windows\System
    Comdlg32.ocxC:\WINNT\System32 or C:\Windows\System

REFERENCES

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
278674 Determine the Version of MSXML Parser Installed on a Computer
This article contains links to the following Download Center files:
Xmlversion.exe
Xmlversiontext.exe
Versions.exe
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.

Properties

Article ID: 307272 - Last Review: February 27, 2014 - Revision: 7.3
APPLIES TO
  • Microsoft XML Core Services 4.0
Keywords: 
kbnosurvey kbarchive kbdownload kbhowtomaster KB307272

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com