1. 程式人生 > >網站訪問報如下錯誤

網站訪問報如下錯誤

controls string 如果 客戶端和服務器 端口 sta 方法 sys pro

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.HttpException: 無法向會話狀態服務器發出會話狀態請求。請確保已啟動 ASP.NET State service,並且客戶端和服務器端口是相同的。如果服務器位於遠程計算機上,請檢查 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection 的值,確保服務器接受遠程請求。

源錯誤:

執行當前 Web 請求期間生成了未處理的異常。可以使用下面的異常堆棧跟蹤信息確定有關異常原因和發生位置的信息。

方法一:

在"管理工具"中的"服務"啟動"ASP.NET State Service"

方法二:

web.config中配置SessionState的mode為StateServer,但指定的服務器沒有開啟那個服務。
改成InProc即可。

方法三:

把殺毒軟件關掉,他可以以為運行生成的文件是帶病毒的,會跟你阻止頁面生成

網站訪問報如下錯誤