Microsoft KB Archive/258182

From BetaArchive Wiki
Knowledge Base


Article ID: 258182

Article Last Modified on 12/5/2007



APPLIES TO

  • Microsoft COM+ 1.0
  • Microsoft COM+ 1.5



This article was previously published under Q258182

SUMMARY

This article explains how to call queued components from an Active Server Page (ASP) by using COM+.

MORE INFORMATION

To call a queued component from an ASP page you must use the GetObject function in Visual Basic Scripting Edition (VBScript) or JScript. The GetObject function needs to specify the queue moniker in order to create a queued component. The queue moniker is used along with the new moniker to activate a queued component. The queue moniker requires that it receive the class ID (CLSID) or Programmatic ID (ProgID) of the object to be invoked from the new moniker directly to the right of it. The new moniker accepts a ProgID or a CLSID (with or without braces) for the component to be activated.

The following code demonstrates how to use GetObject with the queue and new moniker to call a queued component from ASP by using VBScript and JScript. This code assumes that you have already created queued component VBQueuedComp and configured it properly in Component Services.

<%
    'VBScript
    Set obj = GetObject("queue:/new:VBQueuedComp.QCObject")
    
    obj.TestMethod "Test String"
    
    Set obj = Nothing
%>

<%@ LANGUAGE = JScript %>
<%
    'JScript
 
    var obj = GetObject("queue:/new:VBQueuedComp.QCObject");
    
    obj.TestMethod("Test String");
%>

                

REFERENCES

For additional information on configuring a COM+ application for queued components, click the article number below to view the article in the Microsoft Knowledge Base:

246825 How To Configuring a COM+ Application for Queued Components


See the following MSDN Web site for online information on COM+ queued components:

Keywords: kbhowto kbcomplusqc KB258182