Situation:
- In Web.Config we have CustomErrors turned on with
redirectMode="ResponseRewrite"
. - In
Page_Load
of our MasterPage we access theSession
property of thePage
.
Problem:
When an Error occurs on any page the user gets redirected (via Rewrite) to our Error.aspx Page. There in the Page_Load of the MasterPage we access the Session and get an HttpException telling us to enable SessionState. But we have the SessionState enabled, definitly.
Question:
How can we access the session after a UrlRewrite in the Page_Load Event of our MasterPage?