This article explains how to use WinDbg in case of an Active Server Pages
(ASP) 'ASP0115 Access Violation' error during the execution of a custom
component that is written in Visual C++ or Visual Basic.
You can use WinDbg to further debug the component to find the actual line
of code that the component is failing on.
Install WinDbg from the Microsoft Platform SDK.
Follow the instructions below for running it. Turn off Code Optimization
in your compiler and compile the debug version with the .pdb files. The debug symbols (.pdb files) for your custom component should be placed in the same folder as the .dll file, and when you use WinDbg make sure the source files for your component are available on the server.
To use WinDbg, follow these steps:
- Install WinDbg from the Microsoft Platform SDK.
- Start WinDbg. From the Debug menu, click Attach to A Process. Select the correct Process ID (PID) from the Process List:InetInfo PID:
If the Web application is running in the same memory space as InetInfo, select Inetinfo.exe from the Process List.
If the Web application has been set up to run in a separate memory space, the process will be an instance of Mtx.exe. There may be multiple instances of Mtx.exe in the Process List, so you can use one of the two methods outlined below to identify the appropriate process to attach to.
- If the Web site is being hosted on a computer that is running Windows NT 4 with Service Pack 4, you can use the Script Debugger to obtain the processID of the appropriate instance of Mtx.exe. To do this, open the Script Debugger's Running Documents window. The root folder for each isolated application is listed, along with the processID of the appropriate instance of Mtx.exe.
- If the Web site is being hosted on a computer running Windows NT 4 with Service Pack 3 or earlier, you will need to use a special utility to determine the processID. The IIS Resource Kit for IIS version 4.0 includes a utility called "GetPID" that you can use to identify the Process ID for an isolated application.
- From the Debug menu, click Exceptions, and then double-click Access Violation.
- Select Action = 'Enabled', and then click OK.
- Generate the Access Violation by connecting to the Web site.
- The dialog box will prompt you for the source code. Browse to the source code and then select either the .cls file or the .cpp file.
The WinDbg debugger should now open another window, showing the line on which the component access violated highlighted in yellow.
For more information on remote debugging with WindDbg, click the following article numbers to view the articles in the Microsoft Knowledge Base:
Setting up for remote debugging
How to set up a remote debug session using a modem
How to set up a remote debug session using a null modem cable
How to set up Windows NT Debug Symbols
For more information on debugging components, see the following Knowledge Base articles:
How to debug a native code Visual Basic component in VC++
How to debug ISAPI DLLs under IIS 4.0 and IIS 5.0
Article ID: 192754 - Last Review: May 29, 2006 - Revision: 4.0
- Microsoft Internet Information Server 4.0
- Microsoft Internet Information Services 5.0
- Microsoft Active Server Pages 4.0
- Microsoft Visual Studio 6.0 Enterprise Edition
- Microsoft Visual Studio 97 Service Pack 3
|kbbug kbdebug kbhowto KB192754|