Compartilhar via


Troubleshooting an ISAPI Failure

Some ISAPI filters and extensions may fail under certain conditions.

Keep the following points in mind when troubleshooting a failure:

  • To debug your ISAPI filter or extension in the pool, you must attach to the DLLHost.dll instance that is hosting it.

  • If your ISAPI filter or extension calls any form of RevertToSelf, your thread will run as the WAM user (IWAM_machinename) for pooled applications. The WAM user does not have many of the capabilities of the local system account; thus, privileged calls that rely on the local system account after reverting will fail.

  • If your ISAPI filter or extension uses a thread pool and creates worker threads from either HttpExtensionProc or DllMain, the resulting worker threads will be unable to adjust the token associated with them. As a result, any calls to APIs such as RevertToSelf, ImpersonateLoggedOnUser, and SetThreadToken will fail when called from the worker thread. You can work around this problem by calling RevertToSelf immediately before creating the worker threads.

If your ISAPI filter or extension falls into one of the previous categories and cannot be made to run in the pool, you can still configure it to run in-process in IIS 5.0 isolation mode. To accomplish this, you can create an in-process application, or you can add the extension to the InProcessIsapiApps list in the metabase. This list contains the full paths to any extensions that need to run in-process. All extensions on this list are run in-process, regardless of the configuration of the application that contains them.

To create an in-process application

  1. Create the new application virtual directory or server.

  2. Open its property sheets.

  3. On the Home Directory, Virtual Directory, or Directory property sheet, under Application Settings, select Low (IIS Process).

To add an extension to the InProcessIsapiApps list

  • Because there is no user interface for the list, you must use a command-line tool, such as Adsutil.vbs or Mdutil.exe, to add your extension. The full path of the metabase key is HKEY_LOCAL_MACHINE/W3SVC/InProcessIsapiApps.