Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


COM+ (MTS) deployed at client.

Posted on 2004-12-01
Medium Priority
Last Modified: 2011-10-03
I am developing on 3-tire application, where register all the component on server (Business Layer) and deployed the MSI file exported from package of Component Service on client machine.

but what i am not able to get is as i deploy the MSI file on client machine it also intall the DLL compont on the client machine, then if any change occure or any break in ActiveX version my client application is not able to access it.

Might be i am bit confusing, please explain where i am wrong or provide some usefull link.

Thanks in advance.

Amit Jain
Question by:amit1978
  • 4
  • 2
LVL 10

Expert Comment

ID: 12717882
You should not install the DLL on tClient machine. If this is happening you have the wronk kind of MSI (Server Application). When exporting (creating the MSI) from COM+ on the server machine, you should create an Application Proxy MSI. The client machine should not have the DLL registered at all before running the MSI  - if it does uninstall the current MSI/unregister the DLL. Every time you upgrade the public interface(s) of your COM+ component, you need to rexport and redeploy the MSI, (uninstalling the previous one first). On your development machine, you will have trouble if you try and run the COM+ component in debugger locally if you have the proxy stub registered. Also as stated previously you may have trouble registering the proxy stub if you have the dll registered. The act of compiling in VB automatically registers your control.

Other things to note:

COM+ objects should be developed with Binary Compatibility set.
COM+ objects work best when they are stateless, i.e. do not hold their own data.

Author Comment

ID: 12723535
Hi thanx for response.

could u pls let me know step and setting to be done for exporting and inporting the MTS package. its realy good if u provide some usefull like too.

meanwhile i do some RND(tests) on COM+ feature and so.

LVL 10

Accepted Solution

fds_fatboy earned 900 total points
ID: 12724516
This is what I do. It seems to work.

Before starting, it is a good idea to remove all registry references to the COM+ dll or it's proxies from all machines involved (client/server/development).

For the purposes of this example the dll file will be called Example.dll

Part 1 Creating a COM+ component.
* Make sure that Project/Properties/Component/Binary Compatibility is set.
* Check Project/Properties/Component/Remote Server Files
* Compile your DLL (for this example into C:\Dev\Example)
* Run
        regsvr32 /u C:\Dev\Example\Example.dll
        - to remove the dll reference from the registry - this step is to allow testing of the MSI on the development machine.

Part 2 Creating a package
* Copy your Example.dll and Example.tlb (Example.tlb was produced when Example.dll was compiled)  to a directory on the COM+ server (for this example, C:\Public\ComPlusDlls)
* On the COM+ server, open Component Services
* In the console treeview, select Console Root/Computers/My Computer/COM+ Applications.
* Right click on COM+ Applications in the treeview.
* In the menu select New/Application.
* In the wizard: Create an Empty Application/Server application.
* Enter the name of your COM+ application (Example)
* Select "This user" and enter the Administrator Username and Password and Finish.
* Open the Treeview entry "../Example/Components".
* Right Click on Components node and selext New/Component from the menu.
* In the Wizard:Install New Components
* Browse to C:\Public\ComPlusDlls and select Example.dll and Example.tlb. Click Next/Finish

Your component should be set up in your package.

Part 3 Exporting a package (for application proxy)
* Select the Treeview entry "../Example", Right-click it.
* From the Menu select Export
* In the wizard select Export As Application Proxy
* Browse to a directory (in this example: C:\Public\ClientMSI) and  enter a filename (e.g. Example.msi)

Part 4 Importing the Proxy stub
On the Client machine:
* Uninstall the previous version of Example.msi
* Get a copy of the new
* Install the new Example.msi.

The client machne now has a proxy stub installed.
If you look inside "..\Program Files\ComPlus Applications" you will find at least one folder. Each folder in here is named with the GUID of the COM+ package. If you open the folder, each one contains at least one type library file (*.tlb). If you look you should find your tlb file.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 12725035
ok i have missed

* Check Project/Properties/Component/Remote Server Files

Thanx ..... but could u give me some usefull site where i can get some usefull information regarding COM Plus(MTS) and point keep in mind for developing and deploying COM+ component(i have clear fundamental of activeX).

like transaction mode(supported, required, required new....)

Also some tipical interview question help me.

Author Comment

ID: 12725041
>>>>>>>>>>>points increased.<<<<<<<<<<<<<<<

Author Comment

ID: 12725117
and also if DLL is running on server then its something like out of process component then what the difference between ActiveX DLL and EXE.

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question