Results 1 to 4 of 4

Thread: Debug InProc COM Components Inside IIS Using WINDBG

  1. #1
    Join Date
    Nov 2009
    Posts
    58

    Debug InProc COM Components Inside IIS Using WINDBG

    I am working on ASP and C# to build a website of a Jewellery shop. I have earlier also succeeded in building websites for a Travel agency and Sports Club using ASP. Now I have encountered some how this 'ASP0115 Access Violation' error while I was executing a component written in VC++(Visual C++). I want to ask how can I fix it using WinDbg.

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Debug InProc COM Components Inside IIS Using WINDBG

    First you will have to turn off code optimization in the compiler and compile the debug version with the .pdb files. The debug symbols i.e .pdb files of your custom component and the .dll file should be placed in the same folder. Also check that the source files for your component are available on the server when you use WinDbg. So now install WinDbg from Microsoft Platform's Software development kit > start WinDbg > Debug Menu > click Attach to A Process > select the correct Process ID (PID). Now 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 and the Process List is expected to have multiple instances of Mtx.exe. You would have to point out the appropriate process to attach to. Considering the Web site being hosted on a system which 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 achieve this first 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. For a website being hosted on a computer using 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 which you can make use of to locate the Process ID for an isolated application.
    Once the Process ID is located or identified, Go to the Debug menu > click Exceptions > double-click Access Violation > select Action = 'Enabled' > click OK. Now by connecting to the Web site generate the Access Violation. A dialog box will prompt you for the source code. Locate the source code and then select either the .cls file or the .cpp file. Once this is finished, the WinDbg debugger will now open another window, showing the line on which the component access violated highlighted in yellow.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: Debug InProc COM Components Inside IIS Using WINDBG

    Following are the steps for using WinDbg for a Website that is hosted on a machine which is supported by Windows NT 4 to Service Pack 4:

    * Install WinDbg from the MS Platform SDK.
    * Start WinDbg -> Go to the Debug menu -> click Attach to A Process -> select the correct Process ID (PID) from the Process List:InetInfo PID.Now you would have to open the Script Debugger's Running Documents window. The root Directory for each isolated application will be listed, along to the processID of the appropriate instance of Mtx.exe.
    * On Debug menu -> click Exceptions and then double-click Access Violation.
    * Select Action = 'Enabled' -> click OK.
    * Generate the Access Violation by connecting to the Web site on web.
    * Browse to the source code and then select either the .cls document or the .cpp file from the small window that prompts you for the source code. The WinDbg debugger should now open another window, showing the line on which the component access violated highlighted on yellow.

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Re: Debug InProc COM Components Inside IIS Using WINDBG

    WinDbg i.e Windows Debugger is helpful in solving the 'ASP0115 Access Violation'. For a Web aplplication that are share the memory space with InetInfo use the following procedure: In the beginning switch off Code Optimization in the compiler you are using and in the same way compile the debug version to the .pdb files. The debug symbols for your custom component should be placed on the same Directory as the .dll file and before using Windows Debugger check that the source documents for your component are available on the server. No you have to do the following steps to use WinDbg:
    You need to Install WinDbg from the Microsoft Platform SDK, Start WinDbg from the Debug menu, click 'Attach to A Process', select the correct Process ID (PID). If your Web application was running on the same memory space as InetInfo, select Inetinfo.exe from the Process List. From the Debug menu, click on Exceptions and then click two times on Access Violation, select Action = 'Enabled' and then click on OK. Create the Access Violation by adding the Web site. A dialog box will prompt you for the source code. Locate the source code and then select either the .cls document or the .cpp file. The WinDbg debugger should now open another window, showing the line on which the component access violated highlighted on yellow.

Similar Threads

  1. Debug an Activex Component
    By roodiii in forum Software Development
    Replies: 4
    Last Post: 30-11-2009, 11:04 PM
  2. How to see dbgprint message in WinDbg ?
    By BlackSunReyes in forum Windows XP Support
    Replies: 4
    Last Post: 10-08-2009, 05:33 AM
  3. Thread waiting on a lock while running windbg syncblk
    By Dwij in forum Software Development
    Replies: 2
    Last Post: 10-06-2009, 05:40 PM
  4. Replies: 3
    Last Post: 12-01-2009, 07:35 PM
  5. Debug Error
    By X-riskS in forum Windows Software
    Replies: 2
    Last Post: 23-08-2008, 03:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,093,783.29324 seconds with 17 queries