Microsoft Knowledge Base Email Alertz

(244457) - This article describes how to debug a Visual Basic component registered with Microsoft Transaction Server (MTS) from within the Visual Basic IDE, when created and called from an Active Server Pages (ASP) page.

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: 244457 - Last Review: July 15, 2004 - Revision: 3.3

How To Debug an MTS Visual Basic Component Running Under ASP

This article was previously published under Q244457

On This Page

SUMMARY

This article describes how to debug a Visual Basic component registered with Microsoft Transaction Server (MTS) from within the Visual Basic IDE, when created and called from an Active Server Pages (ASP) page.

MORE INFORMATION

Prerequisites

  • Requires Visual Basic 6.0 or later.
  • Requires Windows NT 4.0 Service Pack 4 (SP4) or later. MTS debugging is not supported under Windows 95 or Windows 98.
  • The Visual Basic Class that you are debugging should have its MTSTransactionMode property set to anything other than 0 - NotAnMTSObject.
  • Must compile (build the DLL) and set binary compatibility on the project.

Step-By-Step Procedures

  1. Open a new Visual Basic ActiveX DLL project.
  2. Rename Project Name to prjMTSDebug and Class1 to clsMTSDebug
  3. Add the following code to clsMTSDebug:
    Public Function Sum( Val1 As Integer, Val2 As Integer) As Integer
    	Sum = Val1 + Val2
    End Function
    					
  4. Compile the DLL.
  5. Set the binary compatibility for the project.
  6. Press F5 to run the project. Accept the default settings, and click OK.
  7. Create and add this ASP to one of your virtual directories.
    <%
           Dim Obj
           Set Obj = Server.CreateObject("prjMTSDebug.clsMTSDebug")
           Response.Write Obj.Sum(2,3)
           Set Obj = Nothing
    %>
    					
  8. Put a breakpoint in Sum function (in Visual Basic IDE).
  9. Run the ASP page from a browser. It breaks at the breakpoint.

Notes

  • Do not deploy an MTS component when you are in a debug session.
  • The MTS component that you debug runs as a library package, which doesn't support component tracking, role checking, or process isolation.

APPLIES TO
  • Microsoft Active Server Pages 4.0
  • Microsoft Transaction Services 2.0
  • Microsoft Visual Basic 6.0 Learning Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
Keywords: 
kbbug kbdebug kbhowto KB244457
       

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