Did you know that you can use the AppFabric Cache with ASP.NET? AppFabric Cache provides an ASP.NET session state provider. There are a number of reasons that you would want to consider using the AppFabric Cache instead of other caching technologies, including the built in ASP.NET caching.
The AppFabric Cache provides a number of benefits to ASP.NET programmers. When web applications need to maintain state, especially across a Web Farm, or needs to maintain objects across restarts AppFabric Cache provides the out of process, distributed highly available functionality you require. In addition, because of the distributed nature of the cache you no longer need to worry about sticky routing (getting the client back to the same machine as their cached objects). You also no longer need to add additional code and incur the overhead of storing state in a database. By keeping activity oriented objects closer to the consuming logic you can eliminate the overhead and increase performance of your application.
To utilize the AppFabric Cache ASP.NET session state provider open your applications’ Web.Config file and enter the following XML fragment.
<system.web> <sessionState mode="Custom" customProvider="SessionStoreProvider"> <providers> <add name="SessionStoreProvider" type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider, Microsoft.ApplicationServer.Caching.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </providers> </sessionState> </system.web>
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }