AspNet.ViewState.NCache
5.3.7
See the version list below for details.
dotnet add package AspNet.ViewState.NCache --version 5.3.7
NuGet\Install-Package AspNet.ViewState.NCache -Version 5.3.7
<PackageReference Include="AspNet.ViewState.NCache" Version="5.3.7" />
<PackageVersion Include="AspNet.ViewState.NCache" Version="5.3.7" />
<PackageReference Include="AspNet.ViewState.NCache" />
paket add AspNet.ViewState.NCache --version 5.3.7
#r "nuget: AspNet.ViewState.NCache, 5.3.7"
#:package AspNet.ViewState.NCache@5.3.7
#addin nuget:?package=AspNet.ViewState.NCache&version=5.3.7
#tool nuget:?package=AspNet.ViewState.NCache&version=5.3.7
AspNet.ViewState.NCache
This package lets you offload ASP.NET View State storage to NCache instead of the default hidden field storage embedded in the page, reducing page payload size and centralizing View State across a distributed, highly available cache cluster.
Installation
Install-Package AspNet.ViewState.NCache
or, using the .NET CLI:
dotnet add package AspNet.ViewState.NCache
What is Installed
Installing this package adds the following configuration files to your project:
- client.ncconf — Contains information about the cache servers of each cache the application needs to access.
- config.ncconf — Used for local inproc cache and inproc client caches. For a client cache, this file must also contain the name of the clustered cache that the client cache is a part of.
- tls.ncconf — Contains TLS/SSL settings used to secure communication between the client and the NCache cluster, if enabled.
- viewState.xml — Contains provider-specific configuration for View State caching: which cache to use, and which web apps/groups/pages it applies to. By default, the
cache-namefield points todemoCache.
NCache tries to read cache information from these local config files first. If the required information isn't found locally, it falls back to the configs inside the NCache installation directory. If NCache is not installed on the machine running the application, make sure all required information is present in the local configs.
Prerequisites
- .NET Framework ASP.NET Web Forms application
- NCache Enterprise Edition SDK 5.3.7.1 or later
- An NCache Enterprise Edition server up and running, with the target cache already created/registered on it.
Getting Started
Setting up NCache
Before running your application (if NCache is not installed on the current machine), you need to update client.ncconf so the client knows which cache to connect to and where to find it:
- Open
client.ncconf. - Locate the cache entry named
demoCacheand rename it to the name of your actual cache (the cache you created on the NCache server). - Under the
serversettings, update the server address to point to one of the nodes in the cluster where that cache is running.
Example:
<cache id="dempCache" ... >
<server name="10.0.0.1" ... />
</cache>
Change demoCache → YourCacheName, and 10.0.0.1 → the IP/hostname of a node hosting YourCacheName.
Setting up View State Configuration
The viewState.xml file controls which pages use NCache backed View State, and which cache each of them uses.
- The file can contain multiple web app configurations.
- Each web app configuration can contain one or more group configurations.
- Each group lists the pages it applies to under a
<pages>section, using the relative URL of each page. - Different groups can use different caches by setting the
cache-namefield per group. Default isdemoCache. - If a page isn't found in any group in
viewState.xml, the default settings fromWeb.configare used instead. - If a property is missing for a group, the default value from
Web.configis used for that property.
Example structure :
<webApps>
<webApp name="MyWebApp">
<group name="Group1" cache-name="demoCache">
<pages>
<page url="~/Default.aspx" />
<page url="~/Account/Login.aspx" />
</pages>
</group>
</webApp>
</webApps>
Configuration
| File | Purpose |
|---|---|
client.ncconf |
Cache server addresses for each cache the application needs to access. |
config.ncconf |
Local config for inproc cache / inproc client cache. For a client cache, must include the name of the clustered cache it belongs to. |
viewState.xml |
Maps web apps → groups → pages to specific caches, with demoCache as the default. |
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 | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- Alachisoft.NCache.SDK (>= 5.3.7.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.