How To Configure Visual Basic DLL Project Properties to Run in IIS, MTS, or COM+

Summary

This step-by-step article lists the properties in a Microsoft Visual Basic 6.0 project that you must set to write a good server-side component in Visual Basic. This article also explains why you must enable these properties.

Server-Side Component Best Practices

To write a good server-side component with Visual Basic, such as a Microsoft Transaction Server (MTS) component, a COM+ component, or a component that is called from Active Server Pages (ASP), you must set the following properties in the Visual Basic project:

  1. Start Visual Basic.
  2. On the Project menu, point to Project, and then click Project Properties.
  3. On the General tab, click to select the Retain in Memory and the Unattended Execution check boxes for the server-side component. You must use these settings for a server-side component.For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

    264957 PRB: Visual Basic DLL Has Memory Leaks and Crashes in COM+ If 'Retain In Memory' Is Not Set
  4. On the Component tab, click Binary Compatibility. This compatibility setting is required for you to debug your component from Visual Basic.

    For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

    244457 How To Debug an MTS Visual Basic Component Running Under ASP
    When you do not select this option, a new GUID is generated every time the project is recompiled. As a result, new entries are added to the registry.

    NOTE: You must reset binary compatibility when you add a method.
    For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

    241637 PRB: Adding a New Method to a VB Component in MTS Breaks Existing Client
  5. On the Compile tab, click Create Symbolic Debug Info to build and to compile the project.

    NOTE: Debug symbols are valuable when your MTS application stops responding (hangs). The system looks for symbols in the Winnt\Symbols folder, and then in the path of the DLL. If the system finds the symbols, then the error that is logged in the event log gives more information about where the failure occurred in the component. If the MTS application stops responding, you must have symbols for the post-mortem debug session.

References

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

243548 INFO: Design Guidelines for VB Components Under ASP
คุณสมบัติ

รหัสบทความ: 281630 - การตรวจสอบครั้งสุดท้าย: 24 มี.ค. 2009 - ฉบับแก้ไข: 1

คำติชม