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

Last post 10-27-2009 6:11 AM by Tasha1. 7 replies.

Sort Posts:

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

    09-29-2006, 12:14 AM
    • Member
      48 point Member
    • HiTech2k
    • Member since 09-16-2006, 4:34 AM
    • Posts 20

    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.

     

     

     

     

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

    01-03-2008, 8:35 AM
    • Member
      2 point Member
    • jlc321
    • Member since 01-03-2008, 1:29 PM
    • Posts 1

    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.

     

     

     

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

    02-01-2008, 8:29 AM
    • Member
      14 point Member
    • sweetypie
    • Member since 12-08-2006, 10:09 AM
    • Posts 34

    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

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

    02-16-2008, 12:52 AM
    • Member
      2 point Member
    • Scott Nation
    • Member since 05-25-2007, 5:29 PM
    • Posts 2

    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

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

    03-18-2008, 1:25 PM
    • Member
      34 point Member
    • caesar
    • Member since 04-19-2006, 1:46 PM
    • Posts 11

    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 ?

     

    Filed under: ,
  • Re: Good news for those of you who get "Unable to make the session state request to the session state server." error..

    03-30-2008, 12:35 AM
    • Member
      2 point Member
    • jenzwhiz
    • Member since 03-30-2008, 4:13 AM
    • Posts 1

    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

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

    10-21-2009, 8:15 AM
    • Member
      2 point Member
    • moindear
    • Member since 08-06-2005, 7:11 AM
    • Posts 3

    aspnet_regiis -i

    running this in the command prompt of the .net version worked for me


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

    10-27-2009, 6:11 AM
    • Member
      36 point Member
    • Tasha1
    • Member since 04-27-2008, 3:41 PM
    • Posts 65

    Thanks ! I am working on IIS 7 and just checking the Startup solved it for me!

Page 1 of 1 (8 items)