积极答复者
aspx页面报session错误!

问题
-
错误信息:
服务器错误'/'应用程序。
会话状态才能使用时的EnableSessionState设置为true,无论是在配置文件或Page指令。请同时确保System.Web.SessionStateModule或自定义会话状态模块在<configuration> \的<system.web> \ <httpModules>区段包含在应用程序配置。
描述: 未处理的异常出现在当前Web请求的执行。请检查堆栈跟踪信息确定有关错误的信息以及它产生在代码中。
异常详细信息: System.Web.HttpException:会话状态才能使用时的EnableSessionState设置为true,无论是在配置文件或Page指令。请同时确保System.Web.SessionStateModule或自定义会话状态模块在<configuration> \的<system.web> \ <httpModules>区段包含在应用程序配置。
源错误:
未处理的异常的过程中生成的执行当前Web请求。信息源和异常的位置可确定使用下面异常堆栈跟踪。
堆栈跟踪:
[HttpException(0x80004005):会话状态才能使用时的EnableSessionState设置为true,无论是在配置文件或Page指令。请同时确保System.Web.SessionStateModule或自定义会话状态模块在<configuration> \的<system.web> \ <httpModules>区段包含在应用程序配置。] System.Web.UI.Page.get_Session()2647384 System.Web.UI.UserControl.get_Session()+17 Revolution.WebSite.BaseUserControl.GetCurrentUserBySession()43 Revolution.WebSite.Page_HeadLink.Page_Load(对象发送,EventArgs五)48 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,对象澳,对象t,EventArgs五)+14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(对象发送,EventArgs五)+35 System.Web.UI.Control.OnLoad(EventArgs五)99 System.Web.UI.Control.LoadRecursive()+50 System.Web.UI.Control.LoadRecursive()141 System.Web.UI.Control.LoadRecursive()141 System.Web.UI.Control.LoadRecursive()141 System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)627
版本信息:微软。NET Framework版本:2.0.50727.4200; ASP.NET版本:2.0.50727.4016
这个如何解决呢?!<!-- [HttpException]: 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. at System.Web.UI.Page.get_Session() at System.Web.UI.UserControl.get_Session() at Revolution.WebSite.BaseUserControl.GetCurrentUserBySession() at Revolution.WebSite.Page_HeadLink.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->
Anything Is Possible !
答案
-
问题已解决
把sharepoint 端口下面的web.config 的<!--<pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">-->
改为:
<pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false">
即可!
Anything Is Possible !- 已标记为答案 Jiang Hao 2010年2月2日 1:33
全部回复
-
问题已解决
把sharepoint 端口下面的web.config 的<!--<pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">-->
改为:
<pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false">
即可!
Anything Is Possible !- 已标记为答案 Jiang Hao 2010年2月2日 1:33