Replacing webrole's session storage with appfabic in azure
If multiple instances are specified during the deployment of a webrole, session sharing between these instances is a problem that must be solved.
We know that the session storage methods in Asp.net are: inproc, sqlserver, StateServer, and custom. This section describes how to use appfabic to store sessions on azure.
1. Activate the cache service on Windows azure platform, for example.
2. Configure web. config to use the cache service to store sessions
<Configuration> <! -- Make sure that this node is the first node --> <configsections> <section name = "datacacheclients" type = "Microsoft. applicationserver. caching. datacacheclientssection, Microsoft. applicationserver. caching. core "allowlocation =" true "allowdefinition =" everywhere "/> </configsections> <datacacheclients> <datacacheclient name =" default ">
Reference: Windows azure appfabric caching service Introduction
Install, configure, and use Windows Server appfabric