Jaa


.Net framework update 4.5.2 breaks State server ….

 

Web application on Visual studio 2013 on windows 7 64bit box

Customer had solution which was running is 32 bit and uses .net 2.0 uses IIS Express.

When we launch http://localhost:888/Login.aspx  in the background it contacts various Databases and does a

redirect to AT&T site which uses session State server ( internally ) and launch the login page for user to enter credentials.

When we have .net framework update 4.5.2 this breaks with following error:

Server Error in '/' 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 (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) +1835429

   System.Web.SessionState.OutOfProcSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id,

SessionStateStoreData item, Object lockId, Boolean newItem) +191

   System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +560

   System.Web.SessionState.SessionStateModule.OnEndRequest(Object source, EventArgs eventArgs) +160

   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68

   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

  --------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5483 

Note: Issue can be resolved by rolling back .net update 4.5.2 to 4.5.1.

 

 

Resolution :

==================================

Collected a network trace and we notice that there was a disconnect or Reset which was happening from back end Database.

When we looked deep into architecture of the Server we found it had a Firewall: “Hips”

HIPS stands for “Host-based Intrusion Prevention System“. We then asked customer to investigate why its rejecting the connection and we found that HIPS stores a hash for the aspnet_state.exe in the dynamically created firewall rule allowing it.

Even though you are using adaptive mode the install of the .NET 4.5.2 update which installs a newer aspnet_state.exe did not result in either this rule being replaced or updated. When you manually went into the rule configuration and used their wizard to drill down to the "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_state.exe" file it then updated the stored hash to a new value and the test solution is now back working.

More information on Hips : https://blog.malwarebytes.org/intelligence/2013/05/whatiships/

 

 

Hope this Helps !

Irfan