Hello,
I have developed an ASP.NET c# application.
I have a "Reports" page in which i put the the report's DataTable in a session (to use it later on for paging and sorting).
This works on my localhost but on production I get the follwong 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\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.
After some investigation I found that the error occurres when the session state is configured to work with the state server. It doesn't happen when working "In Proc". I have a feeling it happens because there is a large amount of data to store in the session.
How can I fix that?
Thank you,Dana
![]() |
0 |
![]() |
well, if you are running on a single web server, just use Application or Cache to store the DataTable. With Application do not forget to clean after you (which is probably impossible due to connectionless nature of web). Cache will clean automatically when needed.
if you are running on multi-server configuration, try to understand if it is really required to do so, because using both state server and sql state both imply sending data over intranet, so instead of fetching this binary serialized data table you could fetch this data over and over again from relational database which would take pretty same time.
![]() |
0 |
![]() |
hello
this problem happened because ASP.NET State Service is not running on production server,
please make sure to start this service before opening the webpage.
Go to control panel , service manager , navigate to ASP.NET State Service , right click , click start .
Note:
If you are using State Server or SQL Server mode, objects in the session state will be serialized and deserialized when a request is processed.
So make sure your objects are serializable and their classes must be marked as so. If not, the session state will not be saved successfully.
Regards,
Anas Ghanem.
Note:Please Don't hesitate to click "Report Abuse" link if you noticed something wrong on the forums (like duplicate ,Off-topic,offensive,or any post that violates the website "TERMS OF USE"). -- Thanks!
![]() |
0 |
![]() |
The service is running and still... I get this error...
![]() |
0 |
![]() |
post the SessionState configuration section please.
Regards,
Anas Ghanem.
Note:Please Don't hesitate to click "Report Abuse" link if you noticed something wrong on the forums (like duplicate ,Off-topic,offensive,or any post that violates the website "TERMS OF USE"). -- Thanks!
![]() |
0 |
![]() |
<sessionState mode="StateServer" stateConnectionString="tcpip=tamgr-clus01:42424" stateNetworkTimeout="200" cookieless="false" />
![]() |
0 |
![]() |
danal:
<sessionState mode="StateServer" stateConnectionString="tcpip=tamgr-clus01:42424" stateNetworkTimeout="200" cookieless="false" />
the TCP/IP port 42424 must be opened on tamgr-clus01 server ,
please go to the firewall settings and open the mentioned port.
Regards,
Anas Ghanem.
Note:Please Don't hesitate to click "Report Abuse" link if you noticed something wrong on the forums (like duplicate ,Off-topic,offensive,or any post that violates the website "TERMS OF USE"). -- Thanks!
![]() |
0 |
![]() |
This is internal network , port is open , Also ,The state server is working for other application fine on same computer , and for this one as well( if state server will be down there would have been an error right from the start )
![]() |
0 |
![]() |
danal:
<sessionState mode="StateServer" stateConnectionString="tcpip=tamgr-clus01:42424" stateNetworkTimeout="200" cookieless="false" />
Hi danal,
If “tamgr-clus01” is the server that running your web application, please use “localhost” or “127.0.0.1” as the server name, for example:
stateConnectionString="tcpip=127.0.0.1:42424"
If “tamgr-clus01” is not the server which hosts your web application, pleaes open registry on "tamgr-clus01" by running “regedit.exe”, and ensure the value of “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection” is set to 1, by default it is set to zero so that it doesn't allow remote connections.
In addition, if the ASP.NET version is 1.1, please also refer to the following link:
FIX: You may receive an error message when you use the ASP.NET State Server service to store ASP.NET session state in the .NET Framework 1.1
http://support.microsoft.com/kb/896600/en-us
Sincerely,
Benson Yu
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
![]() |
0 |
![]() |