[ASP.NET State service] error

brightking716發表於2010-08-05

When you login the system ,it will show error as below:

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.

[@more@]

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.

Cause:

web.config中配置SessionStatemodeStateServer,但伺服器沒有開啟改個服務。

Solution:

1. 在服務中啟用"ASP.NET State service" ;

2. 如果啟用"ASP.NET State service" 出現問題,可以將Web.Config裡面 sessionState mode改為"InProc" ;

mode設定將Session資訊儲存到哪裡
Off
設定為不使用Session功能
InProc
設定為將Session儲存在程式內,就是ASP中的儲存方式,這是預設值。
StateServer
設定為將Session儲存在獨立的狀態服務中。
SQLServer
設定將Session儲存在SQL Server中。

Reference:

http://hi.baidu.com/tgszsh/blog/item/c3228fcecb038a0e93457e8d.html

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12472709/viewspace-1036190/,如需轉載,請註明出處,否則將追究法律責任。

相關文章