GetLastError fails to get error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having trouble using Server.GetLastError() on my asp.net pages. I defines a standard error page in my web.config to handle all site errors, but the page that is supposed to handle the error creates an error itself.

Whenever I try to retrieve the last made error with Server.GetLastError() will retrieve a null result, so if I try to print out something like Server.GetLastError().ToString() the page will spit out a nullreference exception.

I have no ideas on how to get this to work, I have tried different uses of Server.GetLastError with and without () but nothing seems to help.

Does anybody have expierence or has anybody heard about this problem?

Thanks in advance,
Jan van der Veen
 
Back
Top