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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top