Article ID: 243546 - Last Review: April 22, 2003 - Revision: 1.2

PRB: ASP Does Not Support Events

This article was previously published under Q243546
Expand all | Collapse all

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 (http://www.microsoft.com/ntserver/techresources/appserv/MSMQ/msmqrevguide.asp )
MSMQ Documentation from the Platform SDK (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msmq/msmq_overview_4ilh.asp?frame=true)

APPLIES TO
  • Microsoft Active Server Pages 4.0
Keywords: 
kbeventservice kbprb KB243546
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations