In the applications I develop I catch any exception in the Global_Error event handler in the Global.asax file. Basically I use
Request.FilePat h to get the name of the file where the error was thrown
Server.GetLastE rror.InnerExcep tion this is actually the detailed exception you might be looking for .. i find this property extremely useful
Server.GetLastE rror.StackTrace you get the sequence of procedures executed that lead to the exception
Server.MachineN ame the server name where the exception ocurred, you can skip this but in my case i have both a development and production server and this property allows me to tell if I caused the exception when developing or the exception was thrown by a user
Request.ServerV ariables("HTTP_ USER_AGENT") the client browser information ... very useful if you want to create statistics about who mess with your app
Request.ServerV ariables("REMOT E_ADDR") the client IP adress where the error ocurred... if you are in an intranet it is useful but if you app is public then you probably are behind a firewall and you will get the firewall IP adress.
I create a report email for every exception. Play around with them and try several ways to catch and handle exceptions
Hope this helps
Alan Ferrandiz Langley
geekswithblogs. com/aferrandiz
"darrel" <no*****@hotmai l.com> escribió en el mensaje news:uO******** *****@TK2MSFTNG P09.phx.gbl...
I have a question below about an error I am getting:
Exception has been thrown by the target of an invocation.
Is there anyway to get asp.net to give me more details than the above? My
catch statement is as such:
Catch exc As system.Exceptio n
div_updateLog.V isible = true
lbl_updateLog.t ext = exc.Message
End Try
-Darrel