Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

ASP.NET session caching

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:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint