Unable to make the session state request to the session state server in .Net

Dung Do Tien May 05 2022 212

Hello Guys. I have a project with Vb.net, run in .Net framework 4.7. The project still runs very well for me on my PC. Today I clone the project from Github and run it on my laptop and I got an exception 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.  You can see detail below:

 [HttpException (0x80072749): 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) +1389
   System.Web.SessionState.OutOfProcSessionStateStore.DoGet(HttpContext context, String id, StateProtocolExclusive exclusiveAccess, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) +258
   System.Web.SessionState.OutOfProcSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) +53
   System.Web.SessionState.SessionStateModule.GetSessionStateItem() +169
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1008
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +689
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134

Unable to make the session state request to the session state server in .Net

My environment:

  1. .Net framework 4.7 & Vb.Net
  2. Window 10
  3. IDE: VS 2022

Thank you for any idea.

Have 1 answer(s) found.
  • r

    raoudha gayed May 05 2022

    I got the same error. You need to start service "ASP.NET State Service" first and it will solve the issue for you.

    To enable ASP.NET State Service service, you can choose:

    1. Open Services manager(window 10 or 11) -> find the item ASP.NET State Service 

    Unable to make the session state request to the session state server in .Net

    2. Double click on that item -> click Start button

    Unable to make the session state request to the session state server in .Net

    After running the service successfully, please reload your website. It worked for me with this solution.

Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips

X Close