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
Move any code in the
Initialize
,BeginRequest
,EndRequest
, andTerminate
events to thePreRender
,PageInit
,Load
, orUnLoad
events as appropriate.Any code that deals with state management (typically in the
Initialize
andTerminate
events) will need to be replaced. For more information, see Saving ASP.NET Page Values (Visual Studio).The FatalErrorResponse event has been replaced by structured error handling in ASP.NET.
Add a Try...Catch block for any calls to
ProcessEvents
orWriteTemplate
and call in the Catch block.Pass the System.Exception object from the Try...Catch block into the
FatalErrorResponse
code.Modify the
FatalErrorResponse
code to use the System.Exception object instead of the Visual Basic 6.0 WebClassError object.
See Also
Concepts
WebClasses for Visual Basic 6.0 Users
Structured Exception Handling Overview for Visual Basic
ASP.NET Overview