samsmithnz
Senior Contributor
I working hard at creating a generic error handler for a big application I'm working on. I'm a little confused about how to do this.
I've tryed adding Try..Catch statements that redirect to a Error.aspx page, but it's difficult to pass the error to the error page. Whenever I try to use the Server.GetLastError function, it only returns nothing.
I also tryed manually spitting out the error with response.write, and then server.transfer, but I get threading errors, I have to have a blank error page (which isn't really very good), and it seems overly cumbersome...
I've tryed using the defaultRedirect attribute in the web.config file, but I'm not sure if I'm still supposed to use the try catch statements or not.
can anyone give me some guidance/ideas?
I've tryed adding Try..Catch statements that redirect to a Error.aspx page, but it's difficult to pass the error to the error page. Whenever I try to use the Server.GetLastError function, it only returns nothing.
I also tryed manually spitting out the error with response.write, and then server.transfer, but I get threading errors, I have to have a blank error page (which isn't really very good), and it seems overly cumbersome...
I've tryed using the defaultRedirect attribute in the web.config file, but I'm not sure if I'm still supposed to use the try catch statements or not.
can anyone give me some guidance/ideas?