How to generate debug information for ISAPI extensions in IIS 6.0 (909888)



The information in this article applies to:

  • Microsoft Internet Information Services version 6.0

Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

SUMMARY

The source code for Microsoft Internet Information Services (IIS) 6.0 contains debug statements to report debug information for ISAPI extensions. This article describes how to configure a computer to generate debug information for ISAPI extensions in IIS 6.0.

MORE INFORMATION

To configure a computer to generate debug information for ISAPI extensions, follow these steps.

Create a registry key

To create the required registry key, follow these steps:

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
  1. Click Start, click Run, type Regedit.exe, and then click OK.
  2. Locate and then click the following registry key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters

  3. Right-click Parameters, point to New, and then click Key.
  4. Type W3ISAPI, and then press ENTER.
  5. Right-click W3ISAPI, point to New, and then click DWORD Value.
  6. Type debugflags, and then press ENTER.
  7. Right-click debugflags, and then click Modify.
  8. In the Value data box, type the flag value that you want, and then click OK. The valid flag values appear in the following table.
    Flag valueStatement
    0x80000000Print a debug line when an attempt is made to load an ISAPI extension.
    0x10000000Print a debug line when the HttpExtensionProc function for an ISAPI extension is called.
    0x01000000Print a debug line when an ISAPI extension calls the GetServerVariable function.
    0x02000000Print a debug line when an ISAPI extension calls the ServerSupportFunction function.
    0x04000000Print a debug line specific to the ServerSupportFunction function command that is called by an ISAPI extension.
    0x08000000Do not print the first part of the buffer when printing debug output of functions that use non-string buffers. Examples of functions that use non-string buffers are the ReadClient and WriteClient functions.
    0x00100000Print a debug line when an ISAPI function fails.
    0x00200000Print a debug line when an ISAPI function succeeds.
    0x00400000Print a debug line when an ISAPI extension calls the ReadClient function.
    0x00800000Print a debug line when an ISAPI extension calls the WriteClient function.
    0xffffffffPrint all debug lines.

Use the WinDbg debugger (Windbg.exe) to view the debug output

To use Windbg.exe to view the debug output, follow these steps:
  1. Download and then install the Debugging Tools for Windows. To download the Debugging Tools for Windows, visit the following Microsoft Web site:
  2. Run Windbg.exe. By default, the Windbg.exe file is located in the following folder:

    Drive:\Program Files\Debugging Tools for Windows

    Note Drive represents the hard disk on which Windows is installed.
  3. On the File menu, click Attach to a Process.
  4. In the Attach to Process box, click the inetinfo.exe node, and then click OK.
  5. In the Workspace 'base' dialog box, click Yes.

Modification Type:MajorLast Reviewed:1/16/2006
Keywords:kbISAPIExt kbInetDev kbDebug kbhowto KB909888 kbAudDeveloper