Developing for Windows Azure Shared Caching
The topics in this section help you to get started developing applications that use the caching features of Windows Azure Shared Caching.
Before you can use Shared Caching, you must first provision a cache. For more information see How to: Create a Cache (Windows Azure Shared Caching).
|You should not develop for both Microsoft AppFabric 1.1 for Windows Server and Windows Azure Cache on the same development machine. It is possible to mistakenly reference some of the Microsoft AppFabric 1.1 for Windows Server assemblies in the Global Assembly Cache. This could lead to incorrect or unexpected behavior.|
Shared Caching Development Overview
If you want to access a cache from your .NET application, you must first configure your .NET project in Visual Studio. For more information, see How to: Prepare Visual Studio to Use In-Role Cache (Windows Azure Cache). After your cache is provisioned and the Visual Studio project is prepared, you can then begin to use your cache in your .NET application. The following topics in this section describe this process. Note that ASP.NET applications can use caching for session state or output caching by simply changing the web.config file. But any applications, including ASP.NET, can programmatically access the cache using the Cache API. For more information, see Develop for Windows Azure Cache.
Both Windows Azure and Microsoft AppFabric 1.1 for Windows Server contain a similar set of APIs for caching. This includes using assemblies with the same name and the same Microsoft.ApplicationServer.Caching namespace. However, not all of the on-premises features apply to the cloud. For more information about the differences, see Differences Between Caching On-Premises and in the Cloud.
In This Section
How to: Configure a Cache Client using the Application Configuration File (Windows Azure Shared Caching)
How to: Configure a Cache Client Programmatically (Windows Azure Shared Caching)
How to: Configure the ASP.NET Session State Provider (Windows Azure Shared Caching)
How to: Configure the ASP.NET Output Cache Provider (Windows Azure Shared Caching)