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.