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:
|
Cause:
web.config中配置SessionState的mode为StateServer,但服务器没有开启改个服务。
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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12472709/viewspace-1036190/