Error message different than Context.Server.GetLastError.Message

Discussion in 'ASP .Net' started by tshad, Jan 27, 2005.

  1. tshad

    tshad Guest

    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 = ""
    objMail.To = ""
    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
    tshad, Jan 27, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christopher

    Server.GetLastError() return null

    Christopher, Jul 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,606
    terry
    Jul 2, 2003
  2. Dave

    Server.GetLastError()

    Dave, Dec 1, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    345
  3. Lars Netzel

    Problem with Server.GetLastError!

    Lars Netzel, Aug 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    8,669
    Lars Netzel
    Aug 2, 2004
  4. José Joye
    Replies:
    6
    Views:
    2,511
    José Joye
    Aug 4, 2004
  5. Seguros Catatumbo
    Replies:
    2
    Views:
    2,035
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Sep 13, 2007
Loading...

Share This Page