Microsoft Knowledge Base Email Alertz

(299633) - This step-by-step procedure demonstrates how to debug (or step through) Microsoft Visual Basic (VB) Component Object Model (COM) components that are used within Active Server Pages (ASP) pages. Debugging VB COM Components That Are Used in ASP Pages On...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 299633 - Last Review: May 29, 2006 - Revision: 5.1

How To Debug Visual Basic COM Components That Are Used Within Active Server Pages

This article was previously published under Q299633

On This Page

SUMMARY

This step-by-step procedure demonstrates how to debug (or step through) Microsoft Visual Basic (VB) Component Object Model (COM) components that are used within Active Server Pages (ASP) pages.

Debugging VB COM Components That Are Used in ASP Pages

  1. On the Start menu, point to Programs, point to Microsoft Visual Studio 6.0, and then click Microsoft Visual Basic.
  2. In Visual Basic, open the COM component project that you want to debug, and set a breakpoint in the location where you want to debug. To do this, click anywhere in the statement where you want to debug. On the Visual Basic Debug menu, click Toggle Breakpoint. Notice that a colored dot appears in the left margin to indicate the breakpoint line. To remove the breakpoint, you can click the dot. To set breakpoints at other lines, you can click the corresponding locations in the margin.
  3. Press the F5 key, and run the component within the VB Integrated Development Environment (IDE). If a dialog box prompts you about how to run the component, click Wait for components to be created.
  4. Open Internet Services Manager. To open Internet Services Manager in Microsoft Internet Information Server (IIS) 5.0, follow these steps:

    1. From the Microsoft Windows Start menu, point to Programs, and then click Administrative Tools.
    2. Click Internet Services Manager.
    To open Internet Services Manager in IIS 4.0, follow these steps:
    1. From the Windows Start menu, point to Programs, and then click Windows NT 4.0 Option Pack.
    2. Click Microsoft Internet Information Server.
    3. Click Internet Service Manager.
  5. In Internet Services Manager, right-click the virtual directory that contains the ASP page that calls your component, and then click Properties. Under Anonymous Access, click Edit, and set the Directory Security of this virtual directory to anything other than Anonymous.
  6. In your Internet browser, run the ASP page that calls the component. The component automatically breaks into the VB project at the breakpoint location.
  7. Press the F8 key to debug (step through) your VB component.

Troubleshooting

If you are already running a compiled version of this dynamic-link library (DLL) from this ASP page, you may not hit the breakpoint. In this scenario, you may want to stop and restart Microsoft Internet Information Server (IIS) services. To do this, on the Windows Start menu, click Run, and then type IISRESET. Please note that this command stops and restarts IIS, as well as all IIS applications that are running.

REFERENCES

166275  (http://kbalertz.com/Feedback.aspx?kbNumber=166275/EN-US/ ) How To Debug a Native Code Visual Basic Component in VC++
264957  (http://kbalertz.com/Feedback.aspx?kbNumber=264957/EN-US/ ) BUG: VB DLL Has Memory Leaks and Crashes in COM+ if 'Retain In Memory' Not Set
259725  (http://kbalertz.com/Feedback.aspx?kbNumber=259725/EN-US/ ) PRB: Error Occurs When You Debug a COM+ Component Under the Visual Basic IDE with an ASP Client
265492  (http://kbalertz.com/Feedback.aspx?kbNumber=265492/EN-US/ ) BUG: ObjectContext Item Collection Is Empty When You Debug Under COM+
244457  (http://kbalertz.com/Feedback.aspx?kbNumber=244457/EN-US/ ) How To Debug an MTS VB Component Running Under ASP

APPLIES TO
  • Microsoft Active Server Pages 4.0, when used with:
    • the operating system: Microsoft Windows 2000
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Services 5.0
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 6.0 Professional Edition
Keywords: 
kbbug kbdebug kbhowto kbhowtomaster KB299633
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate