Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

WebClass event is not supported

Certain events in Visual Basic 6.0 WebClass projects either are not supported in ASP.NET Web Application projects or are supported differently. Typical examples of such events include BeginRequest, EndRequest, and FatalErrorResponse. These event procedures will be upgraded to your ASP .NET Web Application project, but the code will never be invoked at run time.

What to do next

  1. Move any code in the Initialize, BeginRequest, EndRequest, and Terminate events to the PreRender, PageInit, Load, or UnLoad events as appropriate.

  2. Any code that deals with state management (typically in the Initialize and Terminate events) will need to be replaced.

  3. The FatalErrorResponse event has been replaced by structured error handling in ASP.NET.

    1. Add a Try...Catch block for any calls to ProcessEvents or WriteTemplate and call in the Catch block.

    2. Pass the System.Exception object from the Try...Catch block into the FatalErrorResponse code.

    3. Modify the FatalErrorResponse code to use the System.Exception object instead of the Visual Basic 6.0 WebClassError object.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.