Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Debug ISAPI DLL!!!!

Posted on 1998-10-23
Medium Priority
Last Modified: 2013-11-20
How do I debug a ISAPI Dll with IIS 4.0 & Visual C++ 5.0?

I have tried all the tricks that work with C++ 4.0..and IIS 1/2....but how do I debug with the NEW stuff?
Question by:spacedog2
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

rakeshkalra earned 100 total points
ID: 1323786
Getting the Microsoft Internet Information Server up and running with your DLL in the debugger is possible, but a little tricky. You will need to first find a quiet server where you can debug your DLL in a controlled setting. Once you've found such a resource, you can start debugging your DLL by following these steps:

1.Stop the Internet Information Server publishing services by using the Internet Information Server Manager, or by stopping the services with the Services icon in the Windows NT Advanced Server Control Panel. Note that you must stop all three services even though you are only debugging extensions to the World-Wide Web publishing service. To make things easier, you might wish to make the services "Manually" started in Control Panel so you can avoid this step later in your development.

2.Start Microsoft Developer Studio, and click the Close Workspace command on the File menu to close any opened workspace.

3.On the File menu, click Open Workspace to open the INETINFO.EXE program. This file is in the directory where you installed the Microsoft Internet Information Server.

4.On the Build menu, click Settings, then click the Debug tab in the Project Settings dialog box.

5.With General selected in the Category box, type the following in the Program Arguments text box:

-e W3Svc

6.Choose Additional DLLs from the Category drop-down list. Then, in the Local Names box, specify the complete path and name of your extension DLL or DLLs. Make sure the check box next to each is marked.

7.Click OK to close the Project Settings dialog box.

8.Make sure that the .PDB file for your DLL is in the same directory as the DLLs you plan to debug.

Debugging Tips
The Internet server can be run as an interactive application. This makes debugging it much easier. To do this you need to make a few changes to your system. For the user account that you are going to run the server under, you need to add a few privileges.

To add privileges, run User Manager (MUSRMGR.EXE), and select User Rights from the Policies menu. Check the Show Advanced User Rights check box. Then select "Act as part of the operating system" from the Right drop-down list, and add the user account.

Repeat this process with "Generate Security Audits" (also in the Rights drop-down list). Make sure that all Internet Services (WWW, ftp & gopher) are stopped and INetInfo.Exe is not running (use TLIST to check). Log off and log back on. You can then load the Internet Server with the command line:

INetInfo.Exe -e W3Svc

If you want to load this under a debugger just make sure that the command line to INetInfo.Exe is "-e W3Svc". (For example, to load it into WinDbg the command line is: WinDbg INetInfo.Exe -e W3Svc

You are ready to go. In Developer Studio, point to Debug on the Build menu and then choose Go. This action starts the WWW publishing service, and the debugger will be aware of symbols in your DLL. You'll get a warning that this file doesn't have debugging information in it, but you can ignore that message.

When you leave Microsoft Developer Studio, you will probably want to make sure that you let Developer Studio save the workspace for INETINFO.EXE. This will let you avoid reentering all of the settings you need to make—instead, you can just open the INETINFO.MDS workspace file when you are ready to start the debugger again.

Cached DLLs
You can adjust the registry setting at HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/W3SVC/Parameters/CacheExtensions to have the server reinitialize DLLs each time they are used. If this setting is 1, the server will keep DLLs loaded in memory as long as possible. This is the default setting for the server, since it helps the server achieve peak performance, and should only be changed if you are using the server for debugging. If you make the setting zero, the server will always reload extension DLLs each time they are used.

Forcing the server to reload your DLL is very helpful when your DLL might be crashing or upsetting any per-instance data that it maintains. By forcing the server to reinitialize the DLL, you can get your DLL back into a predictable state with very little effort. You should make sure you test your DLL using the normal CacheExtensions setting, however, to make sure code in your DLL isn't completely dependent on that initial state.


Author Comment

ID: 1323787
I found a much easier method off of http://support.microsoft.com!

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question