This section applies when using the AppFabric caching session state provider from an ASP.NET page. As a Web farm administrator, you will need to ensure the configuration files on each Web server for applications using AppFabric caching properly point to all the cache cluster servers. This is done by ensuring that there is a <host> entry for each cache host server in the <dataCacheClient><hosts> section in the Web.config file. Caching changes to a configuration file do not require recompilation of any .NET Framework code.
In the following configuration the administrator has added entries for the three servers in the AppFabric caching cluster. This also increases the availability of the caching servers.
<
dataCacheClient
>
hosts
host
name
=
"CacheServer1"
cachePort
"22233"
/>
"CacheServer2"
"CacheServer3"
</
The named cache (“NamedCache1” here) must be specified in the Web.config file for the AppFabric Cache session state provider.
sessionState
mode
"Custom"
customProvider
"AppFabricCacheSessionStoreProvider"
providers
<!-- specify the named cache for session data -->
add
type
"Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider"
cacheName
"NamedCache1"
For more information about caching configuration file entries, see Configuring an ASP.NET Session State Provider (Windows Server AppFabric Caching).