ASP.NET Session State with SQL Server In-Memory OLTP and Session isolation set to snapshot

2

We deployed a new build on Framework v 4.7.2. We also deployed the async Asp.Net session state module and in memory OLTP provider as documented here

Our testing environment was fine, and the canary server tested fine. We then rolled the build out to the other servers in the farm, and suddenly starting seeing lots of these exceptions:

System.Data.SqlClient.SqlException (0x80131904): Memory optimized tables and natively compiled modules cannot be accessed or created when the session TRANSACTION ISOLATION LEVEL is set to SNAPSHOT

Our provider configuration is as follows:

<providers>
    <add name="SqlSessionStateProviderAsync"  connectionStringName="Session.ConnectionString" 
    type="Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync, 
    Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync, 
    Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
    UseInMemoryTable="true" MaxRetryNumber="5" RetryInterval="100"  />
</providers>

EDIT:

Removed reference to AllowConcurrentRequestsPerSession which is not configured here, but as an app setting

c#
asp.net-mvc
session-state
sql-server-2017
memory-optimized-tables
asked on Stack Overflow Nov 22, 2018 by Matt Evans • edited Nov 26, 2018 by Matt Evans

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0