BUG: WithEvents Causes BeginRequest, EndRequest, and Start Events Not to Fire from WebClass (280300)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q280300 SYMPTOMS
When you use the WithEvents keyword to handle events of an object within a Visual Basic 6.0 Internet Information Services (IIS) application (WebClass), the BeginRequest, EndRequest, and Start events of the WebClass fail to fire.
CAUSE
The WebClass runtime's events are being overridden. The WithEvents keyword causes the object to be bound to the same EventSink as the WebClass object. The WebClass object in the EventSink is overridden and removed by the new object. As a result, the BeginRequest, EndRequest, and Start events are not fired because the only object in the EventSink is the object declared as WithEvents and this object does not have these events.
RESOLUTION
In general, because Microsoft Active Server Pages (ASP) should process requests as fast as possible and return immediately to the client, you should not call components that are waiting for event notifications from other components. If you must use events within your WebClass application, wrap the object that is handling the events in a COM object that you can call from the WebClass.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCES
For additional information on ASP component guidelines, see the following page on the MSDN Online Web Workshop:
For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
243546 PRB: ASP Does Not Support Events
Modification Type: | Major | Last Reviewed: | 10/15/2002 |
---|
Keywords: | kbBug kbDSupport kbEvent kbWebClasses KB280300 |
---|
|