Error "Http exception was unhandled by user code. Request Not Availablein this context"

Discussion in 'ASP .Net' started by Blasting Cap, May 17, 2006.

  1. Blasting Cap

    Blasting Cap Guest

    I had some old code set to throw an email to me when a user hit an
    exception.

    VS 2003 worked fine with the code, VS 2005 when I run it in debug mode
    pauses over the code each time, and gives me the message:

    "HTTPException was unhandled by user code. Request Not Available in
    this context."

    This is the code that it says it doesn't like:

    log2.WriteEntry("Remlink" & _
    "MESSAGE: " & ex.Message.ToString & _
    "\nURL: " & Request.Path & _
    "\nSOURCE: " & ex.Source.ToString & _
    "\nFORM: " & Request.Form.ToString() & _
    "\nQUERYSTRING: " & Request.QueryString.ToString() & _
    "\nTARGETSITE: " & ex.TargetSite.ToString & _
    "\nSTACKTRACE: " & ex.StackTrace.ToString & _
    EventLogEntryType.Error)

    Basically, all I am doing is determining which log to write the event to
    above, and then the code for the mail follows this code here.

    Why is this thing now barfing on that particular line of code? Anything
    I've found referencing the specific message has not been of any help.


    Any ideas?
    Blasting Cap, May 17, 2006
    #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. hfk0
    Replies:
    2
    Views:
    21,629
  2. JavaQueries
    Replies:
    1
    Views:
    3,613
    John C. Bollinger
    Mar 1, 2005
  3. Balaji
    Replies:
    3
    Views:
    10,062
  4. Bishop
    Replies:
    1
    Views:
    753
    Bishop
    Feb 24, 2007
  5. juvi
    Replies:
    3
    Views:
    1,035
    Alexey Smirnov
    Jan 22, 2009
Loading...

Share This Page