.NET State server: Unable to make the session state request to the session state server


I had an issue with an existing app, so I created a brand new MVC app with no functionality other than reading session state, and I get the same issue.

With this line in the web.config:

<sessionState mode="StateServer" stateConnectionString="tcpip=" cookieless="false" timeout="20" />

I get this when the app runs and tries to utilize session: "Unable to make the session state request to the session state server."

Full error stack and version info:

[HttpException (0x80070057): 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 '' 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) +3251784
System.Web.SessionState.OutOfProcSessionStateStore.DoGet(HttpContext context, String id, StateProtocolExclusive exclusiveAccess, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) +169
System.Web.SessionState.OutOfProcSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) +26
System.Web.SessionState.SessionStateModule.GetSessionStateItem() +111
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +778
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +254
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3160.0

I have verified the ASP.NET State Service is running, verified that the registry data is accurate, verified the firewall is turned off completely so the local port shouldn't be blocked, etc. What else can I do to verify connectivity with the state server, and what might be going on?

I tried to re-install Framework 4.5, but it was already installed so it didn't do anything. (The app uses Framework 4.5, btw).
I tried the old suggestions of using aspnet_regiis , but that has apparently not been an option in later Framework versions. I see the question asked a few times here, and in other places, but all of them are solved by steps I've already taken, so I'm not sure where to go from here.

Thanks for anyone who can help!

(Edit/addition: I've also set AllowRemoteConnection to 1 in the registry. And I verified the service seems to be listening:

C:\WINDOWS\system32>netstat -aon | find /i "42424"
  TCP              LISTENING       4256
asked on Stack Overflow Oct 25, 2018 by JMnITup • edited Nov 5, 2018 by Claire Furney

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0