I am using Server.GetLastError() to get error details for logging, which is fine, but what I really need is the actual line of code that caused the error.
If you don't have a custom error page, it shows you the actual line that caused the error but I can't seem to find it in the Server.GetLastError() object.
I have noticed that the following code gets me the name of the procedure in which the error occurred:
But not the actual line of code that triggered the error.VB Code:
appException = Server.GetLastError() MsgBox(appException.TargetSite.Name)





Reply With Quote