Profiling an Isapi extension Dll with BoundsChecker VC ?

0 Likes

Problem:

What are the steps needed to profile an Isapi extension Dll with BoundsChecker VC ?

Resolution:

Steps for profiling an ISAPI extension DLL with BoundsChecker-

Software required:

WindowsNT Workstation/Server.

Version: 4

Service Pack: 3

Administrative login privilages to machine.

Internet Explorer.

Version: 4.0

or Version 4.01 Service Pack 1

WindowsNT 4.0 Option Pack

Microsoft Management Console version: 1.0.

Microsoft Index Server

Microsoft Internet Information Server

Microsoft Script Debugger

Microsoft Site Server Express 2.0

Microsoft Transaction Server

Visual C .

Version: 5.

Service Pack: 3

or Version 6 no Service Pack

BoundsChecker.

Version 5.03

or 6.0

Perform the following steps in this sequence:

Angel Make the following settings from the Internet Explorer Properties Dialog:

1. Click the Advanced Tab. Click the Restore Defaults button and make sure that the 'Browse in a new Process' check box is checked.   Click OK to dismiss this dialog box.

Beer Make the following settings from the Microsoft Management Console.  (Start | Programs | Windows NT Option pack 4.0 | Internet Information Server | Internet Service Manager.)

1. Add your virtual directory and make sure the Read and Execute(including script) check boxes are checked.  (Example virtual directory path:  D:\Myisapi\debug).  After creating the virtual directory you can verify the settings from the virtual directories' dialog box. (right click virtual directory | Properties)

2. Exit the MMC.

Coffee Make the following settings from the Control Panel.

1. Choose the 'Services' icon and perform the following actions:

2. Choose the 'FTP publishing Service'.  Turn on the 'Allow service to interact with desktop'.  Also choose to Disable the service.  Click OK.

3. Choose 'IIS Admin Service'. Turn on the 'Allow service to interact with desktop'.  Also choose to Disable the service.  Click OK.

4. Choose the 'World Wide Web publishing Service'. Turn on the 'Allow service to interact with desktop'.  Also choose to Disable the service.  Click OK. Click OK again to dismiss the 'Services Dialog'.

5. Important: Make sure that the path to mspdb*.dll is added to the SYSTEM path environment variable.  This path may be contained in the User but it must be in at least the SYSTEM section of the environment variables.

Example:

Name of variable:  Path

Value of variable: %SystemRoot%\system32;%SystemRoot%;;C:\MSSQL\BINN;C:\Program Files\Mts;C:\PROGRAM FILES\DEVSTUDIO\SHAREDIDE\BIN

Drinks  Create a new key under "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" called inetinfo.exe, and add a string value named 'Debugger' with a value of "[path to BoundsChecker directory]\bc.exe /Binet". The path to BC must be specified and also the /B option with some file name with no extension. This will produce the BCE file which will store the results.(Note: The debugger value must not exceed 23 characters)

Example:

String Value Name: Debugger

Value:             d:\bc\bc.exe /Bd:\abc

[ please note:]

Each time you want to profile a service or dll with BCVC, you have to add this key value. After done, please remember to rename or remove it. Otherwise, each time your IIS starts, it will invoke BC because of this key.

Email  Open standalone version of BoundsChecker.  From here open inetinfo.exe.  Once this is opened go to Program | Settings | Modules and Files tab. Add your modules here and make the desired error detection and event reporting settings within the four other tabs within this settings dialog box.

  Reboot your machine.

Gift  From Visual C Instrument your projects with BoundsChecker.  (Note: Be sure to have VC create a .pdb file. and the configuration set to Debug build.  (See "pdb" in VC help for directions on how to have this file created during builds.)

Cool  Perform the following steps from the Control Panel.  Choose the 'Services' icon.

(Perform steps in this sequence)

1. Choose the 'World Wide Web publishing Service'. Set the startup options for the service to Manual. Click OK.

Click OK again to dismiss the 'Services Dialog'.

2. Choose the 'FTP publishing Service'.  Set the startup options for the service to Manual. Click OK.

3. Choose the 'IIS Admin Service'. Set the startup options for the service to Manual. Click OK.

4. Start the 'World Wide Web publishing Service'.

5. Start the 'FTP publishing Service'.

6. The 'IIS Admin Service' will already be (automatically) started.

  Open your web browser and cause your Isapi extension Dll to be invoked by typing something similar to:

http://localhost/jim/myisapi.dll

  Close browser.  From the Control Panel | Services dialog:

(Perform steps in this sequence)

1. Stop the 'World Wide Web publishing Service'.

2. Stop the 'FTP publishing Service'.

3. Stop the 'IIS Admin Service' .

BoundsChecker will now write session data to the file specified earlier in the registry (d:\abc).  You can use the Task Manager | Processes tab to make sure the bc.exe process is no longer running.  It may take BoundsChecker a few seconds to complete writing to this file.

  You can now view the BoundsChecker (.bce) file from the standalone BoundsChecker.

Old KB# 12247
Comment List
Anonymous
Related Discussions
Recommended