Microsoft KB Archive/243546

= PRB: ASP Does Not Support Events =

Article ID: 243546

Article Last Modified on 4/22/2003

-

APPLIES TO


 * Microsoft Active Server Pages 4.0

-



This article was previously published under Q243546



SYMPTOMS
Active Server Pages (ASP) does not support events.



CAUSE
ASP does not have support to handle events. ASP as an automation client is late-bound and does not have access to the type information required to determine if the object has implemented the IConnectiontPoint interface neccessary for events.



RESOLUTION
Call a COM object from ASP that in turn calls the component that raises the event. The following logic represents the implementation:
 * 1) ASP page calls component 1.
 * 2) Component 1 calls component 2, which performs some work and then raises an event.
 * 3) Component 1 loops until a flag is set. The flag is triggered by component 2 raising the event.
 * 4) Component 2 raises an event to notify component 1 that it has completed.
 * 5) Component 1 returns to ASP.

In general, because ASP should process requests as fast as possible and return immediately to the client, you should not call components that are waiting on event notifications from other components. If you need to call components that wait for event notification, consider using Microsoft Message Queue (MSMQ) so that you can immediately return control to your ASP page.



MORE INFORMATION
The following references provide information on using MSMQ:

Message Queue Server Reviewer's Guide

MSMQ Documentation from the Platform SDK

Keywords: kbeventservice kbprb KB243546

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.