Application_Error - Server.Transfer fails

  • Thread starter Thread starter Guest
  • Start date Start date
Hello Dave,

I have posted some explanation about this behavior in your another post
below:

Subject: Application_Start & Exceptions
Newsgroups: microsoft.public.dotnet.framework.aspnet

and according to the ASP.NET model, you can use the following code based on
my test:

=============
void Application_Error(object sender, EventArgs e)
{

if(Context.ApplicationInstance != null)
Context.Server.Transfer("~/errorinfo.aspx");
else
Context.Response.Redirect("~/errorinfo.aspx");
}
=============

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top