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

1.2k Views Asked by At

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

0

There are 0 best solutions below