PRB: ASP Does Not Support Events

ID: Q243546


The information in this article applies to:
  • Active Server Pages


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

Additional query words:

Keywords : kbASP kbGrpASP kbDSupport kbEventService
Version : winnt:
Platform : winnt
Issue type : kbprb


Last Reviewed: December 9, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.