ASP.NET Session has expired (SSRS environment)

If you are hosting SSRS environment on multiple IIS servers, you will need to use a common State Server or SQL Server to store session data. Please note that using In-Process mode or using State Server Mode in the server itself will cause session errors such as “ASP.NET Session has expired”. In order to avoid this issue:



In the web.config file:

  • Set enableSessionState to True. Example:

<pages buffer="true" validateRequest="true" enableSessionState="false" enableViewState="true" viewStateEncryptionMode="Always" controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID">
  • Make sure that Session State is not disabled in pages. If there is enableSessionState parameter in the Page directive, set it to True. Example:

<%@Page enableSessionState="true">
  • There should be stateConnectionString defined in the. IIS servers should point to a common server to store session information. Example:

<sessionState mode="StateServer" stateConnectionString="tcpip=SampleStateServer:42424" cookieless="false" timeout="20"/>
  • To set up a separate server as State Server, install .NET Framework and set the registry key below to “1”. ASP.NET State Service should be running.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnections

References:


Continue reading...
 
Top Bottom