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

Consuming/Using COM+ component in pure ASP page

Step 1: Go to wwwroot of your primary drive: C:\Inetpub\wwwroot (assuming your OS is installed in C drive).

Create a folder named COMAppASPClient inside wwwroot. Create a file CallCOMObject.asp inside COMAppASPClient folder.

Figure 8: Testing asp page setup in the wwwroot

Step 2: Open CallCOMObject.asp file in notepad. Write code to create the object of COMPlusObject.COMService class and calling its function BusinessProcess as shown below. (Note that the BusinessProcess function is the same one we had implemented in the assembly before.)

Figure 9: Code for the ASP page

Save the file.

Step 3: We need to setup the COMAppASPClient folder as a virtual directory in IIS. Open the IIS window as: Control Panel >> Administrative Tools >> Internet Information Services.

Expand the node to reach to the folder COMAppASPClient: Local computer >> Web Sites >> Default Web Site >> COMAppASPClient.

Right click on COMAppASPClient and open the properties window.

Figure 10: Choosing properties option for the directory of ASP page

Click the "Create" button in the application name tag. This makes the directory a virtual directory.

Figure 11: Creating the folder to be a virtual directory

 

(Note: You can skip step 3 if you do not need the ASP page to be accessible from LAN/WAN.)

Step 4: Open an internet explorer window and write the following in the address bar: http://localhost/COMAppASPClient/CallCOMObject.asp

It should show the following result in the page.

Figure 12

It worked. The message string "COM Component Processing Completed" is returned by the COM Component.


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-05-08 12:13:43 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search