打開(kāi)管家婆母嬰版提示“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.”
[重要通告]如您遇疑難雜癥,本站支持知識(shí)付費(fèi)業(yè)務(wù),掃右邊二維碼加博主微信,可節(jié)省您寶貴時(shí)間哦!
今天閑來(lái)事兒不多,想測(cè)試一下管家婆母嬰版本,因?yàn)楣芗移拍笅氚嫘枰玫絀IS,安裝完以后,打開(kāi)就直接顯示錯(cuò)誤,錯(cuò)誤如下;
Server Error in '/MY' 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_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. 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_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. 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_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. 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) +2180324
System.Web.SessionState.OutOfProcSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +221
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +807
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
在上面的錯(cuò)誤仔細(xì)看的話,不難看出問(wèn)題,我還專門(mén)標(biāo)注了一下 ASP.NET State service 其實(shí)就是這個(gè)服務(wù)的問(wèn)題,我們直接啟動(dòng)即可;
解決辦法:
1、啟動(dòng)ASP.NET State service 方法:
開(kāi)始--控制面板---所有控制面板項(xiàng)----管理工具---服務(wù),找到ASP.NET State service?啟動(dòng)即可;
2、mode="StateServer" 修改為 mode="InProc"方式方法;
打開(kāi)站點(diǎn)目錄下的web.config文件,定位到配置節(jié)如下圖所示
<!--<sessionState timeout="600"/>-->
<sessionState mode="StateServer" stateNetworkTimeout="35" timeout="35" />
<!-- 默認(rèn)值為 110秒,4096k -->
<httpRuntime executionTimeout="120" maxRequestLength="1024000" />
將 mode=“StateServer” 修改為 mode=“InProc” 即可;
問(wèn)題未解決?付費(fèi)解決問(wèn)題加Q或微信 2589053300 (即Q號(hào)又微信號(hào))右上方掃一掃可加博主微信
所寫(xiě)所說(shuō),是心之所感,思之所悟,行之所得;文當(dāng)無(wú)敷衍,落筆求簡(jiǎn)潔。 以所舍,求所獲;有所依,方所成!