Implementing Serviced Component in COM+ using Visual Studio 2005
page 4 of 7
by Abhishek Kumar Singh
Feedback
Average Rating: 
Views (Total / Last 10 Days): 31830/ 79

Installing .NET assembly in Component Services to run as a COM+ component

Step 1: Open the Visual Studio 2005 Command Prompt and go to the bin directory of the project.

C: \COMPlusObject\COMPlusObject\bin>

Step 2: Execute the following command at the command prompt.

C: \COMPlusObject\COMPlusObject\bin> regsvcs release\COMPlusObject.dll

The console window will show the message given below.

Figure 4: Registering assembly as the COM+ component using VS command prompt

Ignore the warning message since we did not bother about COM security in this example. You can see the files inside the release folder now. It must have added a new file named COMPlusObject.tlb.

Figure 5: Files in release folder after registering assembly as COM+ component

If you want, you can know about these file types (.pdb and .tlb) in the msdn help.

At this moment the .NET managed assembly COMPlusObject.dll is installed and will be running a COM+ component in the system. Let us verity whether it is really installed in the COM list.

To verify the installation of component service:

Step 1: Open the Component Services window Control Panel >> Administrative Tools >> Component Services.

Step 2: In the tree view panel, expand the nodes in following order: Component Services >> Computers >> My Computer >> COM+ Applications.

Figure 6: Verifying installed COM+ application in Component services window

All child nodes under COM+ applications are installed COM+ components. In this list you can see a node named "MyCOMService" which is the application we are looking for. Note that the application named "MyCOMService" is the same one we set in the assembly attribute earlier.

Step 3: Expand MyCOMServices >> Components, now you will see:

Figure 7: Showing .NET object installed as COM+ component in the system

 

Then we are sure here that our assembly is installed as a COM+ service. Isn’t it? OK, this is installed but what next? Is it now accessible to other application like VB6, Access, ASP, ASP.Net web applications, etc? Yes, it should. Let us go for testing it. Next, I am going to show you the procedures to consume the COM+ component in pure ASP page and also in Access application.


View Entire Article

User Comments

Title: Good Article   
Name: Jabir
Date: 2011-04-06 8:42:22 AM
Comment:
Still am getting error while browse.......

Error Type:
Microsoft VBScript runtime (0x800A01AD)
ActiveX component can't create object: 'COMPlusObject.COMService'
/COMAppASPClient/CallCOMObject.asp, line 3
Title: Gret Article   
Name: Arthur Knight
Date: 2009-08-13 5:23:30 PM
Comment:
Ggggreeeatttt article, very complete. I achieved my first .net com+ service in less than 10 minutes.

Keep up!!
Title: for transaction   
Name: Abhishek Singh
Date: 2008-02-13 2:16:14 AM
Comment:
I know but i have not done practially. so better try yourselft instead of follwing my assumptions.
Title: How to use Transaction   
Name: Anuj D.Vaijapurkar
Date: 2008-02-12 2:11:11 AM
Comment:
Very Nice! And of Lot of Help!
Please tell me how to handle Transactions from within the ComClass.
Title: Great work   
Name: Sachin
Date: 2008-01-29 1:21:51 AM
Comment:
Great article but I guess COM+ is going to be a thing of the past because of Windows Communication Foundation .
Anyways article was superb.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-25 8:23:40 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search