包含Error页面的网站中的每个页面都是从Master页面派生的。在主页面我正在访问会话变量。当我得到异常,在Page_Error或Application_Error事件中处理。从那里我重定向到使用Server.Transfer的错误页面,然后我在Error.aspx的母版页中得到下面的异常。如果我使用Response.Redirect它正常工作。会话状态只能在enableSessionState设置为true时使用,当我使用Server.Transfer
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.
请详细解释Server.Transfer的问题。