zoukankan      html  css  js  c++  java
  • Unable to make the session state request to the session state server处理方法

    Server Error in '/' Application.


    Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same.  If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesaspnet_stateParametersAllowRemoteConnection.  If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    Exception Details: System.Web.HttpException: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same.  If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesaspnet_stateParametersAllowRemoteConnection.  If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.
    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [HttpException (0x80072749): Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same.  If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesaspnet_stateParametersAllowRemoteConnection.  If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.]
       System.Web.SessionState.OutOfProcSessionStateStore.MakeRequest(StateProtocolVerb verb, String id, StateProtocolExclusive exclusiveAccess, Int32 extraFlags, Int32 timeout, Int32 lockCookie, Byte[] buf, Int32 cb, Int32 networkTimeout, SessionNDMakeRequestResults& results) +3630272
       System.Web.SessionState.OutOfProcSessionStateStore.DoGet(HttpContext context, String id, StateProtocolExclusive exclusiveAccess, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) +422
       System.Web.SessionState.OutOfProcSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) +53
       System.Web.SessionState.SessionStateModule.GetSessionStateItem() +178
       System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1076
       System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +115
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +371
    

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    方法一:

    打开站点目录下的web.config文件,定位到配置节,

    <sessionState mode="StateServer"
        stateConnectionString="tcpip=127.0.0.1:10001"
        cookieless="false" timeout="60" />

    这里将 mode="StateServer" 修改为 mode="InProc" 即可。

    方法二:

    不修改 mode="StateServer" ,修改 stateConnectionString="tcpip=127.0.0.1:10001" 。

    定位到注册表HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesaspnet_stateParameters

    将 stateConnectionString="tcpip=127.0.0.1:10001"配置的端口修改为注册表项Port的(42424)端口号即可,如下:

    stateConnectionString="tcpip=127.0.0.1:42424"

  • 相关阅读:
    浅析Python模块的引入和调用
    一篇文章带你了解CSS定位知识
    盘点4大下载神器,教你分分钟搞定文件下载
    Mysql查询语句进阶知识集锦
    (原创)高DPI适配经验系列:(四)高DPI适配示例
    (原创)高DPI适配经验系列:(三)字体与字号、缩放锚点
    (原创)IconFont(矢量图标字体)在Winform中的应用
    (原创)高DPI适配经验系列:(二)按DPI范围适配
    (原创)高DPI适配经验系列:(一)缩放比例与DPI对应关系
    [C#] (原创)一步一步教你自定义控件——06,MaskLayer(遮罩层)
  • 原文地址:https://www.cnblogs.com/codefly/p/5953856.html
Copyright © 2011-2022 走看看