473,379 Members | 1,530 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,379 software developers and data experts.

Application_error event not firing after publishing

0 down vote favorite


I know this has been asked a lot of times, but I could not get things working from those posts.

I have implemented Application_error method in Global.asax file to log and send email for all unhandled exceptions. This works perfectly fine when running on Visual Studio, but as soon as I publish it to the test server, the Application_event stops firing. No log entry is made to the text file and no email is sent.

PrecompiledApp.config file is present in the root directory, along with App_global.asax.compiled, App_global.asax.dll in the bin folder. Global.asax file is not present after I publish the website.

I have tried removing PrecompiledApp.config file, but it doesn't work. I have tried adding Global.asax file to the root directory, but doesn't work. I have tried with

<customErrors mode="Off" />

and

<customErrors mode="On" defaultRedirect="Error Page.aspx" />

in web.config file....nothing works.

I added a line to Page_load of a page:

Response.Write("<br/>ApplicationInstance: " + Context.ApplicationInstance.GetType().FullName);

It returns ApplicationInstance: ASP.global_asax, which should be returned according to a post. Then why is the event not firing?

Please Help!!!

Thanks!!!
Jul 21 '11 #1
1 3030
Frinavale
9,735 Expert Mod 8TB
This sounds suspiciously like a permissions problem.

Typically the anonymous ASP.NET user is not given permissions to write to files and especially not permitted to make log entries for security purposes of the web server that I'm not going to get into right now.

Consider a different means of recording your errors...
Or ask the hosting company to elevate the privileges to allow your application to do what you need it to do.
Jul 27 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Steve M | last post by:
Why are my sessions lasting so long? I have them set to 20 minute timeout in config file? The Session_End event is getting called an hour or more sometimes--well after the user has stopped...
5
by: MS Newsgroups | last post by:
Hi, I have a scenario where I am dynamically adding a control from code when a controls event is fired. The problem I have is that when the newly created control is clicked, the click event does...
7
by: Shane Bishop | last post by:
I've been fighting with the Page_Load event firing twice. I looked through this user group and saw several other people having similar problems. There were various reasons for it:...
8
by: Paul | last post by:
Hi, In a class i built, i fire an event when a field changes. In a webform that has an instance of the class, the event (from the class) is fired and the code is executed. However, my webpage...
4
by: Larry Morris | last post by:
The following code, pasted into a web form with a link button on it, will cause the page_unload event to fire twice. If I remove the response.redirect, the problem goes away :). I've got a work...
4
by: Seraph | last post by:
Again, I'm rather new here, so if I fail to follow any etiquette, please forgive me and let me know what I've done wrong, but I think this might interest quite a few people. One of my colleaques...
2
by: Dan | last post by:
I have an aspx page with a form on it. There are a couple of textboxes and an ImageButton. The page is loaded from another page using Server.Transfer. When I click on the ImageButton, the...
6
by: crk2 | last post by:
Here a simple one. (At least I think it is?) and any help would be truly appreciated. I have an inherited textbox on my form based on a custom texbox control. It looks something like this ...
0
by: hazz | last post by:
I would like to have control over datagridview events so that when a user 'single clicks' anywhere on the grid, a method call is made to a service and if a user 'double clicks' a Customer detail...
16
by: tommaso.gastaldi | last post by:
Hello, A probably dumb question... does anyone know hot to avoid that if one keep the mouse pressed on an arrow of the numericUpDown it continues to fire events (it uses evidently a timer) ?...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.