473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Application_Error event only fires on development server

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/>");
}

Feb 25 '06 #1
1 1838
It turns out that I need to deploy yet another file file that wasn't
necessary prior to my usage of Global.asax. This file is
PrecompiledApp.config. I couldn't find any documentation on this file
or the App_Code.compiled and App_global.asax.compiled files and the
rest of my web site has been working happily without them so I hadn't
previously deployed them. Now that I have deployed all three of these
files, Application_Error() is working!

Mar 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Scott | last post by:
Hi there, I have an odd situation. I have exception handling set up in my Application_Error event handler in my global.asax. On my development box, errors get caught by the event handler fine...
1
by: Greg Burns | last post by:
I am trying to write a global custom error page. I thought I would jot down some of what I've learned so far... At first I just used the default customErrors section with a defaultRedirect tag,...
3
by: tafs7 | last post by:
My code below is supposed to email me when an error occurs on the application, but it's not emailing anything. Am I missing something? I know the smtp servers I've tried work. I even added a...
3
by: Mike Malter | last post by:
I have a general error page that I configured in web.config as <customErrors mode="On" defaultRedirect="CRDefaultError.aspx" /> This error page comes up whenever an error occurs outside of any...
6
by: Rippo | last post by:
I have a problem with the application_error event being fired from my asp.net application with windows 2003 server standard edition. The event fires fine from my test machine (XP) and all works...
0
by: Larry | last post by:
Here's an interesting one. This happens only in the asp.net server that is launched from VS.Net 2005. In IIS it does not occur. We placed a server.transfer call in our global.asax's...
8
by: bmukulu | last post by:
Hi, I am trying to add some error handling in a Global.asax file. I am declaring a session variable within the Application_Error procedure. However, everytime i try to pass something into the...
2
by: =?Utf-8?B?QWxleCBNdW5r?= | last post by:
I am using VS2005 Professional, DOT.NET FrameWork 2. During testing and debugging through the IDE using the development machine LocalHost server whenever an error is encountered the...
5
by: mc | last post by:
I have a function (shown below) that I call to check if a server is present. when a server is present, everything is ok. however when it fails. I get an SocketException fired. On my development...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.