Microsoft Windows CE 3.0  

Debugging ISAPI Extensions and Filters

This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Because the Windows CE Web server is loaded on startup, typically you would have to use a kernel-mode debugger to debug ISAPI extensions and filters. To make it easier to debug ISAPI applications, an executable version of the Web server, HTTPDEXE, is provided with Windows CE 3.0. HTTPDEXE is identical to the Web server, except that it runs as an executable application. To use this debugger on your ISAPI extensions and filters follow these steps:

  1. Stop the Windows CE Web server as described in Starting and Stopping the Web Server.
  2. Copy the Httpdexe.exe file to the root directory of your device. The Httpdexe.exe file is included with your binary distribution of the Windows CE Web server, but it is not downloaded to the Windows CE device during startup.
  3. Build a debug version of your ISAPI application and call the DebugBreakfunction where you want to begin debugging.
  4. Start Visual Studio. Choose Openfrom the Filemenu, and then open Httpdexe.exe from the root directory.
  5. Open an ActiveSync connection from the device to the desktop machine running Visual Studio if you have not done so already.
  6. Press F5 to start httpdexe.exe through Visual Studio. Note that the first time you debug your device, httpdexe.exe may require a few minutes to initialize. After the first debug session, Visual Studio should only require approximately 30 seconds to initialize httpdexe.exe.
  7. You may need to press F5 a few more times to start httpdexe.exe. To determine if the web server has successfully started, look for a start up message appended to the log file named current-httpd.log.
  8. Take the required steps to make the code you are debugging run. The DebugBreakfunction halts operation of the extension or filter at the location of the failure.

    Keep in mind that because HTTPDEXE is not running as a DLL, the Web server administration tools have no effect. To turn the HTTPDEXE server off, you must restart your device.

    Running the Web server as an executable application offers increased isolation from faulty extensions and filters. When the Web server is run as a Device.exe file, it is possible for a faulty ISAPI extension or ISAPI filter to destabilize the system. If the Web server is run as an executable application, ISAPI extensions and filters are in a different address space from system threads, which reduces the possibility of system corruption. If you want additional stability and do not plan to administer the Web server remotely, you should run the Web server as an executable application.

     Last updated on Friday, April 02, 2004

    © 2004 Microsoft Corporation. All rights reserved.