There may be scenarios where it is desirable to use the ASP.NET session state to store user data. But, by default, this data would be stored on each individual role instance, which can quickly cause inconsistencies in the data.
AppFabric caching can be utilized to resolve this issue by storing the session data in the shared AppFabric cache where each instance can access it. A project can be enabled to use AppFabric to store session state through a single configuration entry on the
web.config file. Once the AppFabric
<dataCacheClients> configuration section has been inserted into the
web.config, then one additional entry needs to be added to
<configSections>. Following is the code snippet that is provided by the management portal:
<configSections> <!-- Append below entry to configSections. Do not overwrite the full section. --> <section name="dataCacheClients" type="Microsoft.ApplicationServer. Caching.DataCacheClientsSection, Microsoft.ApplicationServer...