Friday, April 24, 2009

ASP.NET State Service

Error :
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\Param
eters\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.


This is also one of the mostly retrieved errors. This error occurs when using StateServer mode for the sessionState in web.config, yet the ASP.NET State Service is not started.
I met this error when I first made a web application. After I get the solution, I ask a little about about StateServer sessionState mode to a senior.

When making an application with login page, u can consider using StateServer for the sessionState mode, because when u use this mode, u don't have to login again and again, just have to refresh the web page, because the session is still kept on server. Yet, when deploying the application, should omit it, or change it to InProc mode. I used only these 2 modes. Never use the SQLServer mode.

e.g.
<sessionState mode="StateServer" stateconnectionstring="tcpip=127.0.0.1:42424" sqlconnectionstring="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="200000" />



Solution:
Start the ASP.NET State Service on Services. Go to control panel -> Administrative Tools -> Services, or simply press window + Run, then type services.msc. Choose ASP.NET State Service, right-click, then Start the service. To start it automatically, choose startup type : Automatic.
Share:

0 comments:

Post a Comment

About

Related Posts

Cisco VPN not Working on Windows 10

Error: Cisco VPN is not working (cannot login and connect to VPN connection). Solution: 1. Right-click on the VPN client, and Run as Ad...

About Me

My photo
Is an ordinary unNoticed man, with a little knowledge to share and high dreams to achieve. I'd be glad if I can help others, 'coz the only thing for the triumph of evil is for a good man to do nothing. I like English and Chinese language, and know a little about them. Hence, for me, most things can best be expressed in Chinese, some in English, and the rest in others ^^

About Blog

You can find a lot of debugging and deploying problems while developing applications in .NET and Visual Basic here. There are also some querying tips in SQL and typical source codes which might be useful shared here.

Popular Posts

Blogroll

Followers

Follow by Email