Error message different than Context.Server.GetLastError.Message

T

tshad

I have an error routine in my Global.asax that gives me a different message
than asp.net when you let it give you the error page.

My error routine looks like:

*******************************************************
Sub Application_Error
Dim objMail As New MailMessage

objMail.From = "(e-mail address removed)"
objMail.To = "(e-mail address removed)"
objMail.Subject = "Error at Web site"
objMail.Body = Request.Path
objMail.Body &= vbNewLine
objMail.Body &= Context.Server.GetLastError.Message
SmtpMail.Send(objMail)
Context.Server.ClearError()
End Sub
************************************************

The message sent to me is:

/development/staffing/SkillsTestDisplay.aspx
External component has thrown an exception.

The page that asp displays is:

**************************************************
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific error
details and modify your source code appropriately.

Compiler Error Message: BC30451: Name 'Global' is not declared.

Source Error:

Line 34: Sub Page_Load(sender as Object, e as EventArgs)
Line 35: dim temp as string
Line 36: temp = Global.tom()
Line 37:
Line 38: response.write("temp = ")

Source File: c:\inetpub\wwwroot\development\staffing\SkillsTestDisplay.aspx
Line: 36
********************************************************************

Why don't I get the error:

Compiler Error Message: BC30451: Name 'Global' is not declared.

The message that an exception was thrown doesn't tell me anything.

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top