I am using the custom errors attribute in the web.config to handle custom errors
Like this:
<customErrors mode="On" defaultRedirect="~/Error.aspx" redirectMode="ResponseRewrite" />
After an error is thrown, the page is redirected to the error page, but when I access the session in the error page it is null.
The reason I use ResponseRewrite
and not ResponseRedirect
is because I pass the Exception id
through Items using elmah.
I even tried to create new empty asp.net website and it still happens.
I've seen some similar questions but without an answer.