AspNet.SessionState.NCache
5.3.800
dotnet add package AspNet.SessionState.NCache --version 5.3.800
NuGet\Install-Package AspNet.SessionState.NCache -Version 5.3.800
<PackageReference Include="AspNet.SessionState.NCache" Version="5.3.800" />
<PackageVersion Include="AspNet.SessionState.NCache" Version="5.3.800" />
<PackageReference Include="AspNet.SessionState.NCache" />
paket add AspNet.SessionState.NCache --version 5.3.800
#r "nuget: AspNet.SessionState.NCache, 5.3.800"
#:package AspNet.SessionState.NCache@5.3.800
#addin nuget:?package=AspNet.SessionState.NCache&version=5.3.800
#tool nuget:?package=AspNet.SessionState.NCache&version=5.3.800
AspNet.SessionState
NCache Session State Provider for ASP.NET applications. This package lets you offload ASP.NET session state storage to NCache, giving you a fast, distributed, and highly available alternative to InProc, StateServer, or SQL Server session modes — enabling your application to scale out across multiple web servers while keeping session data consistent.
Installation
Install-Package AspNet.SessionState.NCache
or, using the .NET CLI:
dotnet add package AspNet.SessionState.NCache
Prerequisites
- .NET Framework 4.0+ Application.
- NCache SDK 5.3.800 or later.
- An NCache 5.3.800 (or later) server should be up and running, with the target cache already created/registered on it.
Getting Started
Setting up NCache
- Open your application's configuration file:
- .NET / ASP.NET Core:
appsettings.json - .NET Framework / ASP.NET:
app.configorweb.config
- .NET / ASP.NET Core:
- Add an entry for the cache you created on the NCache server, keyed by the cache's name. The
example uses
defaultCache; replace it with your cache's name. - Set
serverto one or more nodes of the cluster where that cache is running. Separate multiple nodes with commas.
appsettings.json
{
"ncache": {
"defaultCache": {
"server": "20.200.20.24,20.200.20.25",
"port": 9800
}
}
}
app.config / web.config
<configuration>
<configSections>
<section name="ncache" type="Alachisoft.NCache.Client.NCacheSection, Alachisoft.NCache.Client" />
</configSections>
<ncache>
<caches>
<add name="defaultCache" server="20.200.20.24,20.200.20.25" port="9800" />
</caches>
</ncache>
</configuration>
The cache name in the configuration must match the name you pass in code:
ICache cache = CacheManager.GetCache("defaultCache");
Setting up Package
- Register NCache as the session state provider:
- ASP.NET Framework — update
web.config(see Configuration section below).
- ASP.NET Framework — update
Configuration
ASP.NET Framework (web.config):
<system.web>
<sessionState
mode="Custom"
customProvider="NCacheSessionProvider">
<providers>
<add name="NCacheSessionProvider" type="Alachisoft.NCache.Web.SessionState.NSessionStoreProvider" exceptionsEnabled="true" enableSessionLocking="true" enableSessionSharing="false" emptySessionWhenLocked="false" sessionLockingRetry="-1" sessionAppId="NCacheSharedSessionApp" useInProc="false" enableLogs="false" cacheName="YourCacheName" writeExceptionsToEventLog="false" AsyncSession="false"/>
</providers>
</sessionState>
</system.web>
Adjust cache name and other settings as needed for your environment.
The cookieSameSite setting is applied when the server runs .NET Framework 4.7.2 or later (where HttpCookie.SameSite exists); on an older framework it is ignored.
Resources
Technical Support
Alachisoft provides various technical support resources.
Visit the Alachisoft Support Center to select a support resource appropriate for your issue. To request additional features or report a documentation discrepancy, contact support@alachisoft.com.
License
Copyright © 2026 Alachisoft. All rights reserved.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.0
- Alachisoft.NCache.SDK (>= 5.3.800)
-
.NETFramework 4.6.2
- Alachisoft.NCache.SDK (>= 5.3.800)
- System.Configuration.ConfigurationManager (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.3.800 | 33 | 10/21/2026 |
| 5.3.7 | 362 | 7/29/2026 |
| 5.3.6.1 | 4,119 | 10/10/2025 |
| 5.3.6 | 447 | 8/13/2025 |
| 5.3.5.1 | 379 | 5/30/2025 |
| 5.3.5 | 432 | 5/16/2025 |
| 5.3.4 | 894 | 6/6/2024 |
| 5.3.2 | 7,417 | 10/9/2023 |
| 5.3.1 | 10,327 | 9/12/2022 |
| 5.3.0 | 1,752 | 4/12/2022 |
| 5.2.1.1 | 2,009 | 3/4/2022 |
| 5.2.1 | 14,043 | 10/12/2021 |
| 5.2.0.1 | 4,556 | 4/6/2021 |
| 5.2.0 | 3,864 | 3/25/2021 |
| 5.1.0 | 3,950 | 11/23/2020 |
| 5.0.4.1 | 2,062 | 11/4/2020 |
| 5.0.4 | 2,123 | 10/28/2020 |
| 5.0.3 | 26,931 | 6/15/2020 |
| 5.0.2 | 2,439 | 1/6/2020 |