Microsoft KB Archive/258182

= How To Invoke Queued Components from ASP =

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"); %>

