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

application_error isn't thrown

Hi,

I've been using a standard global error handling page for almost two years.
I posted a new revision of code on the site on Friday, and my global error
handling routine quit working. The application_error event in
global.asax.vb just quit being called. Instead, I see the default ASPX
error message. I found that if I copy over one of the .dlls from the dev
site, the error handling starts working properly again. After a while, it
quits working again, and I have to re-copy over a .dll to get it working.

There is one other problem that seems to be related. My application
involves sending out a fair bit of email notification through the default
mail server. The global error handling routine emails a copy of the error
message. It seems that the error handling routine, and all email
notifications throughout quit working at the same time.

Recently, I had some problems with emails being stuck in the
c:\inetpub\mailroot\badmail folder, but I have taken care of those problems
by setting the server to allow relaying from 127.0.0.1. I checked, and
there are no messages stuck in the inetpub\mailroot folders. I've also had
problems with the statement smptMail.smptserver = "blah". That statement
seems to work on some servers, but not others. I have recently switched to
SmptMail.SmptServer.Insert(0,"blah"), which seems to work properly.

The last section of my global error handling routine looks like this:

MyMessage.Body = MyMessage.Body & "<p><b>Last Error
Message:</b>" & Replace(Server.GetLastError().Message(), Chr(13), "<br/>")
MyMessage.Body = MyMessage.Body & "<p><b>Last Error
Source:</b>" & Replace(Server.GetLastError().Source(), Chr(13), "<br/>")
SmtpMail.SmtpServer.Insert(0,
System.Configuration.ConfigurationSettings.AppSett ings("mailServer"))
SmtpMail.Send(MyMessage)

Server.ClearError()

Response.Clear()

Response.Redirect(System.Configuration.Configurati onSettings.AppSettings("ap
pPath") & "ErrorDisplay.aspx")
End Sub
Nov 18 '05 #1
1 1034
Does anybody have any ideas on why this might happen. My application is
using WilsonWebCompile (http://dotnetinfowire.com/news.asp?nid=325) to force
the site to stay alive.

"Mark Heimonen" <ma****@munroept.com> wrote in message
news:O6**************@TK2MSFTNGP09.phx.gbl...
Hi,

I've been using a standard global error handling page for almost two years. I posted a new revision of code on the site on Friday, and my global error
handling routine quit working. The application_error event in
global.asax.vb just quit being called. Instead, I see the default ASPX
error message. I found that if I copy over one of the .dlls from the dev
site, the error handling starts working properly again. After a while, it
quits working again, and I have to re-copy over a .dll to get it working.

There is one other problem that seems to be related. My application
involves sending out a fair bit of email notification through the default
mail server. The global error handling routine emails a copy of the error
message. It seems that the error handling routine, and all email
notifications throughout quit working at the same time.

Recently, I had some problems with emails being stuck in the
c:\inetpub\mailroot\badmail folder, but I have taken care of those problems by setting the server to allow relaying from 127.0.0.1. I checked, and
there are no messages stuck in the inetpub\mailroot folders. I've also had problems with the statement smptMail.smptserver = "blah". That statement
seems to work on some servers, but not others. I have recently switched to SmptMail.SmptServer.Insert(0,"blah"), which seems to work properly.

The last section of my global error handling routine looks like this:

MyMessage.Body = MyMessage.Body & "<p><b>Last Error
Message:</b>" & Replace(Server.GetLastError().Message(), Chr(13), "<br/>")
MyMessage.Body = MyMessage.Body & "<p><b>Last Error
Source:</b>" & Replace(Server.GetLastError().Source(), Chr(13), "<br/>")
SmtpMail.SmtpServer.Insert(0,
System.Configuration.ConfigurationSettings.AppSett ings("mailServer"))
SmtpMail.Send(MyMessage)

Server.ClearError()

Response.Clear()

Response.Redirect(System.Configuration.Configurati onSettings.AppSettings("ap pPath") & "ErrorDisplay.aspx")
End Sub

Nov 18 '05 #2

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

Similar topics

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...
0
by: Michael | last post by:
Hi, I have an ASP.NET application that catches un-handled exceptions in the Application_Error method and writes the details to the Event Log. But, if I do a Server.ClearError() followed by either...
0
by: Michael | last post by:
Hi, I have an ASP.NET application that catches un-handled exceptions in the Application_Error method and writes the details to the Event Log. But, if I do a Server.ClearError() followed by either...
6
by: Matt | last post by:
Can anyone give me a good reason to use BOTH application scope Page_Error and the page scope Page_Error when trapping errors in a web application? Is there any real benefit to using the Page_Error...
10
by: Nemisis | last post by:
Hi everyone, I am trying to create a custom error page, that the user gets shown when a error has occurred within my website. The code works perfectly, apart from when an invalid URL is typed...
5
by: jobs | last post by:
re: try catch finally to close and dispose, but still want Application_error to fire 1. If catch an exception to to dispose and close of a ado connect, how can I allow the exception to still...
1
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
I have a web app that handles errors in the Gloabal.ascx's Application_Error(). It does some logging etc in there and if it throws an error, I want the app to display a static html splash page...
2
by: Cramer | last post by:
I'm developing a new ASP.NET 3.5 app and I have an http module hooked up to Application_Error that logs detailed exception data. When it parses and evaluates unhandled exceptions, it "sees" all...
1
by: Author | last post by:
I searched a little, but could not find anything helpful. In my asp.net 2.0 web application, I am catching application level exceptions in Application_Error of Global.asax. What if my code...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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:
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
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,...
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...

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.