D
David Herbst
VS 2005 / .NET 2.0
Windows 2000 Server sp4 (on development as well as testing server)
Using Web Deployment Project to build assemblies for testing and
production servers.
I added a Global.asax file to my web site so I could implement a
Application_Error() handler. The handler works fine on my development
web server but when I deploy it to the testing web server it doesn't
execute. Instead I get the detailed ASP.NET error page or my
customErrors page depending on the mode setting.
I saw another post which mentioned that this can be caused if
App_Code.compiled and App_global.asax.compiled are not deployed to the
server so I have deployed them to the testing server as well as
App_global.asax.dll but the event still doesn't fire.
On my local development server I tried creating a web site the points
to the Release directory of the Web Deployment Project since these are
the same binaries that are running on the test server.
Application_Error fires as expected.
Here is my code (which works on my local development machine):
void Application_Error(object sender, EventArgs e)
{
// This has been simplified since I am troubleshooting.
Context.ClearError();
Response.Clear();
Response.Write("Application_Error" + "<br/>");
}
Windows 2000 Server sp4 (on development as well as testing server)
Using Web Deployment Project to build assemblies for testing and
production servers.
I added a Global.asax file to my web site so I could implement a
Application_Error() handler. The handler works fine on my development
web server but when I deploy it to the testing web server it doesn't
execute. Instead I get the detailed ASP.NET error page or my
customErrors page depending on the mode setting.
I saw another post which mentioned that this can be caused if
App_Code.compiled and App_global.asax.compiled are not deployed to the
server so I have deployed them to the testing server as well as
App_global.asax.dll but the event still doesn't fire.
On my local development server I tried creating a web site the points
to the Release directory of the Web Deployment Project since these are
the same binaries that are running on the test server.
Application_Error fires as expected.
Here is my code (which works on my local development machine):
void Application_Error(object sender, EventArgs e)
{
// This has been simplified since I am troubleshooting.
Context.ClearError();
Response.Clear();
Response.Write("Application_Error" + "<br/>");
}