Microsoft.AspNet.SessionState.SessionStateModule
2.0.0-preview1
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.AspNet.SessionState.SessionStateModule --version 2.0.0-preview1
NuGet\Install-Package Microsoft.AspNet.SessionState.SessionStateModule -Version 2.0.0-preview1
<PackageReference Include="Microsoft.AspNet.SessionState.SessionStateModule" Version="2.0.0-preview1" />
paket add Microsoft.AspNet.SessionState.SessionStateModule --version 2.0.0-preview1
#r "nuget: Microsoft.AspNet.SessionState.SessionStateModule, 2.0.0-preview1"
// Install Microsoft.AspNet.SessionState.SessionStateModule as a Cake Addin #addin nuget:?package=Microsoft.AspNet.SessionState.SessionStateModule&version=2.0.0-preview1&prerelease // Install Microsoft.AspNet.SessionState.SessionStateModule as a Cake Tool #tool nuget:?package=Microsoft.AspNet.SessionState.SessionStateModule&version=2.0.0-preview1&prerelease
Microsoft.AspNet.SessionState.SessionStateModule
SessionStateModule is ASP.NET’s default session-state handler which retrieves session data and writes it to the session-state store. It already operates asynchronously when acquiring the request state, but it doesn’t support async read/write to the session-state store. In the .NET Framework 4.6.2 release, we introduced a new interface named ISessionStateModule to enable this scenario. You can find more details on this blog post.
Before you can specify one of these custom providers. You need to remove the existing session state module from your web.config file. In addition, you must register the new module to take its place.
<system.webServer>
<modules>
<remove name="Session" />
<add name="Session" preCondition="integratedMode,managedHandler" type="Microsoft.AspNet.SessionState.SessionStateModuleAsync, Microsoft.AspNet.SessionState.SessionStateModule, Version=2.0.0.0, Culture=neutral" />
</modules>
</system.webServer>
Settings of Microsoft.AspNet.SessionState.SessionStateModule
appSetting aspnet:RequestQueueLimitPerSession
How to use - Add
<add key="aspnet:RequestQueueLimitPerSession" value="[int]"/>
into web.config under appSettings section.Description - If multiple requests with same sessionid try to acquire sessionstate concurrently, asp.net only allows one request to get the sessionstate. This causes performance issues if there are too many requests with same sessionid and a request doesn't release sessionstate fast enough, as asp.net starts a timer for each of this request to acquire sessionstate every 0.5 sec by default. This is even worse, if out-proc sessionstate provider is used. Because this can potentially use most of the out-proc storage connection resources. With this setting, asp.net will ends the request after the number of concurrent requests with same sessionid reaches the configured number.
appSetting aspnet:AllowConcurrentRequestsPerSession
How to use - Add
<add key="aspnet:AllowConcurrentRequestsPerSession" value="[bool]"/>
into web.config under appSettings section.Description - If multiple requests with same sessionid try to acquire sessionstate concurrently, asp.net only allows one request to get the sessionstate. With this setting, asp.net will allow multiple requests with same sessionid to acquire the sessionstate, but it doesn't guarantee thread safe of accessing sessionstate.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages (11)
Showing the top 5 NuGet packages that depend on Microsoft.AspNet.SessionState.SessionStateModule:
Package | Downloads |
---|---|
Microsoft.Web.RedisSessionStateProvider
Custom session state provider for redis cache. |
|
Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync
In .Net 4.6.2, asp.net enables developer plug in async version of SessionState module which is a good fit for the non-in-memory SessionState data store. This SessionState provider uses SQL Server as the data store and leverages async database operation to provide better scability. |
|
CouchbaseAspNet
ASP.NET Full Framework SessionState and OutputCache Providers for Couchbase .NET SDK |
|
Microsoft.AspNet.SessionState.CosmosDBSessionStateProviderAsync
In .Net 4.6.2, asp.net enables developer plug in async version of SessionState module which is a good fit for the non-in-memory SessionState data store. This SessionState provider uses CosmosDB as the data store and leverages async database operation to provide better scability. |
|
Oriflame.Web.RedisSessionStateProvider
Custom session state provider for redis cache |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Microsoft.AspNet.SessionState.SessionStateModule:
Repository | Stars |
---|---|
Azure/aspnet-redis-providers
ASP.NET Redis Providers
|
Version | Downloads | Last updated |
---|---|---|
2.0.0 | 486,561 | 6/15/2023 |
2.0.0-preview1 | 4,015 | 4/12/2023 |
1.1.0 | 9,256,043 | 5/12/2017 |
1.0.0 | 12,971 | 9/30/2016 |