Good news for those of you who get "Unable to make the session state request to the session state server." error..

Dear all,

Due to the known problem of session variables getting lost if using InProc-server during frequent changes in development, I had to choose between SQL and ASP.NET State server, so I opted for the second. Initially, all fine, but after using it for a few days, I started to get this error:

 Server Error in '/cv2' Application.
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.
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_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.

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.

Stack Trace:

[HttpException (0x80004005): 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.SessionState.OutOfProcSessionStateStore.MakeRequest(StateProtocolVerb verb, String id, StateProtocolExclusive exclusiveAccess, Int32 extraFlags, Int32 timeout, Int32 lockCookie, Byte[] buf, Int32 cb, Int32 networkTimeout, SessionNDMakeRequestResults& results) +1565
   System.Web.SessionState.OutOfProcSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +192
   System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +355
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

 Meanwhile the event log on the server (W2K2003) always logged this error (rI've emoved some details from it):

 Event code: 3009
Event message: Unable to make the session state request to the session state server. Details: last phase='Reading response from the state server', error code=0x8007274C, size of outgoing data=45999
Event time: 9/29/2006 11:40:17 AM
Event time (UTC): 9/29/2006 3:40:17 AM
Event ID: 0ec55d45b61f457d95d3d3c256d7cab7
Event sequence: 4
Event occurrence: 1
Event detail code: 50016
 
Application information:
    Application domain: /LM/W3SVC/1/Root/cv2-4-128039748000937500
    Trust level: Full
    Application Virtual Path: **********
    Application Path: **********
    Machine name: ********** 
 
Process information:
    Process ID: 720
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: HttpException
    Exception message: 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.
 
Request information:
    Request URL: **********
    Request path: **********
    User host address: 192.168.0.181
    User: ********** 
    Is authenticated: True
    Authentication Type: Forms 
 
Thread information:
    Thread ID: 1 
    Is impersonating: False
    Stack trace:
 
 
Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

"Of course" the link http://go.microsoft.com/fwlink/events.asp did not help, "we're sorry" page showed up.

I also saw a lot of abandoned posts asking about lost session state on this forum when searching. Some suggested increasing the time out, which I believe had nothing to do with the issue.

The state service configuration worked fine when running on the development machine, and I was 100% sure the asp.net state service had the correct and same port numbers.

I also tried the latest VS 2005 SP1 beta on dev. machine and server but no effect on the issue (although it solved some other bugs).

I also tried setting the ASP.NET state server registry key to accept remote connections (flag to 1 instead of 0), but no effect.

It turned out this KB solved the issue:

http://support.microsoft.com/kb/919080/en-us?spid=8940&sid=global

 Interestingly enough, I have not uninstalled the .NET 1.1 framework, and the server is a plain 32-bit platform, so the title was pretty misleading.

So I "adapted" the hotfix to:

1. change dir to: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
2. type aspnet_regiis -i -enable|
3. Machine chews command for about 1 minute or so
4. Done! When I click "log in" button on the start page with correct credentials, the session state is working fine again.

And actually, that's all!

Apparently, the ASP.NET 2.0 framework with IIS was corrupted, but I can't recall any particular action that specifically broke it, except that I did a system restart, which may have triggered some pending action initiated long ago.

Would be interesting to know if this solves the problem for others who have the same issue.

 

 

 

 

0
HiTech2k
9/29/2006 4:14:17 AM
asp.net.tips-tricks 851 articles. 0 followers. Follow

5 Replies
2562 Views

Similar Articles

[PageSpeed] 59
Get it on Google Play
Get it on Apple App Store

Awesome, Dude.

Thanks for the fix. 

james 

 quoted:

So I "adapted" the hotfix to:

1. change dir to: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
2. type aspnet_regiis -i -enable|
3. Machine chews command for about 1 minute or so
4. Done! When I click "log in" button on the start page with correct credentials, the session state is working fine again.

 

 

 

0
jlc321
1/3/2008 1:35:57 PM

Hi,

I wanted to use the StateServer for storing sessions in a web farm scenario. To start with, I tried initally on one server where I ran the client and host on the same machine and I added the following code in web.config:

<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424"

cookieless="false"/>

But i kept getting the error mentioned above. Then I tried the solution mentioned, but I still keep getting the same error.

Can anyone please let me know  what is it that I am doing wrong and what should I do?

Thanks

0
sweetypie
2/1/2008 1:29:56 PM

Hello,

I just moved my web sites to a new local Windows Small Business Server 2003 and got the same error when I tried connecting to a site with a login screen, after logging in. (The site was built with Visual Studio 2005, using ASP.NET 2.0.50727.)
I tried the solution in this article and got a different error when I refreshed the web page (Validation of viewstate MAC failed...). So I closed the browser window (on a client in the same LAN) and tried again, then got the original error again.

The solution I found is this:

On the server, go to Administrative Tools – Services:

Service: "ASP.NET State Service" had Startup Type set to Manual, and was not running.

Changed Startup Type to Automatic, and started it. (Right-click on “ASP.NET State Service” – Properties to change settings). Then it worked.

Hope this helps.
Scott

0
Scott
2/16/2008 5:52:01 AM

2 HiTech2k

Hello,

I've got the 100% same problem with only difference that it crashes immediately when I'm trying to write something to session, but works ok when I'm reading it. I've reinstalled iis asp.net config like you described but it didn't help. Any suggestions ?

 

0
caesar
3/18/2008 5:25:40 PM

Hi,

Thanks for this tip. 

I've tried it already and it's working just fine Big Smile

Kudos!

___________________________________________________
Custom auto graphic designs
http://www.autoskinzonline.com

0
jenzwhiz
3/30/2008 4:35:07 AM
Reply:

Similar Artilces:

Error message
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\Servic...

Error: Unable to make the session state request to the session state server
I have session configured in web.config this way:<sessionState mode="StateServer" cookieless="true", timeout="30" stateConnectionString="tcpip=127.0.0.1:42424" />  ASP.NET State Service is started.   I got an 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\CurrentContr...

Unable to make the session state request to the session state server
Hi all, I'm working on the website http://universityauction.net and I was using session variables using InProc session mode to manage session state. This worked fine until I put the website in a load balanced environment, as inproc sessions get lost when jumping from server to server. I decided to move to a state server mode, so I changed my web.config to: <sessionState             mode="StateServer"             stateConnectionString="tcpip=123.456.7.8:42424"      ...

Unable to make the session state request to the session state server.
 Hello,           I’m receiving this error when I put my website on production."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 men...

Unable to make the session state request to the session state server #2
We have recently started receiving these errors in the event viewer. We are using the out of proc state server on the same machine. The errors become more frequent, almost like it snowballs until users cannot work. System Info: Windows Server 2003 Standard SP2 , 4 GB of RAM, IIS 6.0, Asp.Net 2.0. What I know for certain: The state server is started and running Recycling the app pool nor restarting IIS fixes the problem Rebooting the machine DOES temporarily fix the problem. I changed the stateNetworkTimeout from 10 to 20 in webconfig and that had no effect. There is usuall...

Unable to make the session state request to the session state server etc.
We are getting an error message "Unable to make the session state request to the session state server..." sporadically in one of our applications.  We have several applications running on a 4-server web farm, and these applications have been in production for a year, so it is not a problem that the server is not reachable, not started, not addressed correctly, etc etc etc. One of the applications *does* put a lot of large datasets into session state.  Is there a limit on the allowable size of a session/cached object?  Also, the application opens several windows at once, ...

Unable to make the session state request to the session state server
 We have a web application in our school called CHECM. We are experiencing a high volume of ASP.NET State Server errors throughout this month. These errors have been occurring since 7/11/2006.   Our Session State Mode has been --------------------------------------------------------- <sessionState mode="StateServer" stateConnectionString="tcpip=CHECM:42424" timeout="20" stateNetworkTimeout="30"/>     Here is the Error we get randomly Exception: System.Web.HttpException Message: Unable to make the session state request to the session state server. P...

Visual Studio 2005
 Hi, I have recently been given a PC with Vista on it, and installed Visual Studio 2005 pro. I then moved a ASP.net web project from an XP machine to the Vista one. When I run the project from inside Visual Studio (debug mode) everything works fine on the front end of the website, but if I try and log in I get the following 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 i...

Migrating Session "In proc" from "State Server"
Hi all, I am using Asp.net with vb.net I just migrate the session state In proc to State server... but it gives error.... "Unable to serialize the session state. Please note that non-serializable objects or MarshalByRef objects are not permitted when session state mode is 'StateServer' or 'SQLServer'" I just stored Login Name and some other string properties of User is session ... like, Session("UserName") = strUserName or Session("UserType") = strUserType. "strUserName" and "strUserType" both are string. Any idea ? thanks, SajjadPlease Mark as Answer, if the post Solve you...

How to extract session data from MSSQL using "Sql Server" session state mode
I have confronted with some difficulties: I have a task to extract logged user session data from database to collect statistic information from SPPS 2003 (Sharepoint Portal Server) for analyzing purposes.Information I need looks ordinary enough: username, datetimes of user log in and log out, etc..After digging hundreds of articles and docs, I had found out that session object is serialized into database record. It is ok, but I found no decription about where this data can be stored or how can I have access to it.What can I do with it or what should I read for achieving my object? Thanx...

Developed C#.net WebService 1.1 for Client C#.net 1.1. Getting error "Server was unable to process the Request" Pls Help
Hi., I developed Microsoft C#.net Web Services2003 for the Client Application C#.net 2003. When it runs in 5 machines it gives good performance and has no errors. But if i run the same application in about 80 client machines. Getting error "Server was unable to process the request". I use Sql Server 2005 as my database. I get error even when i login at a time for about 25 users. Tried modifying machine.config too. But went unsuccessful. Live Server is 2003 using IIS 6.0 I use very expensive data handling.  Its very urgent pls help. Have to post in Live Server. Thank u., ...

Unable to use session state server....requires session state server version 2.0 or above.
So, I have Windows 2003 IIS latest service packs running. Its running .NET 2.0 and .NET 1.1 applications in seperate application pools. Just today I applied the following patch to the server. (The server is not running any 3.0 or 3.5 applications or application pools)  Microsoft .NET Framework 3.5 Service Pack 1 and .NET Framework 3.5 Family Update (KB951847) x86 Microsoft .NET Framework 3.5 Service Pack 1 is a full cumulative update that contains many new features building incrementally upon .NET Framework 2.0, 3.0, 3.5, and includes cumulative servicing upda...

"The page requires session state that is no longer available. Either the session has expired, the client did not send a valid session cookie, or the session state history size is too small. Try increa
Hi.. I am making a mobile application using .net framework 2.0. My Application has web farm scenario so for state management I am using Sateserver in my application. My application runs fine if I dont use web farm scenario But in case of web farm scenario it is giving me error "The page requires session state that is no longer available. Either the session has expired, the client did not send a valid session cookie, or the session state history size is too small. Try increasing the history size or session expiry limit." I am not getting why this error is coming ..Though I already h...

What is a "Session" and a "Request" ??
Hello,  I'm new to ASP.Net 2.0 , and I still can't understand what is a "Session" and what is a "Request" ??   Thank You the client browser will request a page and the Request object will give you information about what page they are requesting. the session is a statebag where you can store information that will continue to exist after the page has executed.  information can be added to the Session in page A and then read back from the Session in page B.  the session object is unique per user - so one users does not see data stored b...

Web resources about - Good news for those of you who get "Unable to make the session state request to the session state server." error.. - asp.net.tips-tricks

Resources last updated: 12/30/2015 10:14:13 AM