473,699 Members | 2,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application_Err or 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_Err or() 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.compil ed 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_Err or fires as expected.

Here is my code (which works on my local development machine):
void Application_Err or(object sender, EventArgs e)
{
// This has been simplified since I am troubleshooting .
Context.ClearEr ror();
Response.Clear( );
Response.Write( "Application_Er ror" + "<br/>");
}

Feb 25 '06 #1
1 1851
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.compil ed 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_Err or() is working!

Mar 2 '06 #2

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

Similar topics

1
3784
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 and redirect the user to an error page manually...I know about the defaultRedirect but I'm just not using it. Now when I try to recreate an error on my production box, I get the standard asp.net error page with the big yellow bar accross the top...
1
5918
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, as such: <customErrors defaultRedirect="error.aspx" mode="On" /> First thing I found out about this method, is that I didn't have access to the exception object in my error.aspx page. So this page was going to be
3
3033
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 App_Start handler to see if I could get emailed at all even from the first request of the app, but to no avail. Could someone please help me out? Thanks a lot! --Thiago Web developer AgniTEK
3
3212
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 try/catch blocks. This page has a text box in it that I would like to fill with relevant information about the error. I am trying to put the Server.GetLastError().ToString() in there. It did not work on the page, and I read somewhere that I should...
6
1434
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 well. However the event never appears to fire from windows 2003. I have tried just about everything and can not find an answer. I cannot debug through the windows 2003 server as I do not have VS installed on it plus it is a live server Can any...
0
992
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 Application_Error. When an unhandled exception occurs, this works fine. However, we are seeing that on every page request (under asp.net development server debug mode), that after the ProcessRequest for the desired page, the Application_Error fires as...
8
2573
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 sessionstate i get a error message of 'Object reference not set to an instance of an object.' Is there any workaround for this? And why am I getting this error? Thanks in advance
2
2117
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 Application_Error fires OK and all code in the function is executed successfully. When this application is deployed to the production (using a deployment project). When errors occur the code in Application_Error is ignored completely and the error is...
5
1782
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 machine all seems to work and the exception is fired and caught. however on my production server the exception fires, it's not caught by the try catch and it's also not caught in my application_error handler in Global.asax. Can anyone shed any light...
0
8618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9178
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9035
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8885
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7752
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2348
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.