Techbubbles

Configuring Session Support Using the Azure

 

In-memory session support is un-suitable in Azure Fabric environment. There is a possibility in windows azure where you can host a web role on multiple machines inside the fabric. AspProviders project which I explained in earlier post uses BLOB storage to store session itself. This post explains about configuring the ASP.NET application to use Azure session state provider. We can configure the Session Support using Azure Tablestorageprovider. image

1. Insert the following in web.config file of the Azure Asp.net application.

   1: <system.web>

   2:       ...

   3:         <!-- SessionState Provider Configuration -->

   4:         <sessionState mode="Custom"

   5:         customProvider="TableStorageSessionStateProvider">

   6:       <providers>

   7:          <clear/>

   8:       <add name="TableStorageSessionStateProvider"

9: type="Microsoft.Samples.ServiceHosting.AspProviders.

TableStorageSessionStateProvider"

  10:            applicationName="AzureStore" />

  11:        </providers>

  12:       </sessionState>

  13:        ...

  14:     </system.web>

Session state can persist through application restarts when using the Azure provider.

Share this post :


Related Posts:

%d bloggers like this: