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? 1 1023
Your long concatentated string refers to the Request object twice: "\nFORM: " & Request.Form.ToString() & _ "\nQUERYSTRING: " & Request.QueryString.ToString() & _
The change that you made appears to be more than just a recompile. This
code is part of a routine that you are now calling from a service or some
other code that is not running in ASP.Net context. Therefore, the Request
object is not available. If you are not in ASP.Net, then there is no form
or querystring, so these values are not valuable anyway. You may want to
refactor your routine to pass in the parameters you want, and then have the
calling code pass in either the asp.net bits when calling from a web page,
or pass in empty strings when calling from a non-asp.net context.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Blasting Cap" <go****@christian.net> wrote in message
news:up**************@TK2MSFTNGP03.phx.gbl...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? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Gary Hughes |
last post by:
I'm getting the following error when attempting to link a
managed C++ dll. I can't find any reference to these
errors with google. Can anyone help? I've included the
class definition causing the...
|
by: David Lozzi |
last post by:
Howdy,
I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders!
Now I am making a public function that will take the...
|
by: Joshua V. |
last post by:
We are trying to implement Windows Error Reporting from within our VB.Net
application. Basically we want to replace the standard unhandled exception
message we use with the Windows Error Reporting...
|
by: DCC700 |
last post by:
VS 2005 Converted Header causing error when publishing
After converting from Visual Studio 2003 to 2005, I have had several
issues with a header that is used throughout the project. The...
|
by: AAaron123 |
last post by:
I downloaded the personal website starter kit and when I run it I get the
error shown below.
I found a way of using Launch Surface Area Configuration that is supposed
to fix the remote setting...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM).
In this month's session, the creator of the excellent VBE...
|
by: MeoLessi9 |
last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
| |