Using Azure table storage for ASP.NET session

asp.net, azure, azure-table-storage, session

Solution

I don't think the universal providers have any support for table storage.

Problem

In Azure, sessions are not sticky so it's not sufficient to use `InProc` session when you have multiple Web role instances (which you should, otherwise you're not covered by the Windows Azure Compute SLA which guarantees 99.95% uptime.). Therefore I would like to use Azure table storage for ASP.NET session. I am familiar with SQL Azure, but have not yet used Azure table storage. I am told that the appropriate way to do this is using the ASP.NET Universal Providers, along with a small amount of `web.config` trickery. So far, I have not been able to get this working. There are a variety of postings around this topic, but a lot of them point to using `Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider`, which looks like a precursor to the Universal Providers being released. At the moment, my `web.config` `sessionState` section looks like this: ``` <sessionState mode="Custom" customProvider="TableStorageSessionStateProvider"> <providers> <clear/> <add name="TableStorageSessionStateProvider" type="System.Web.Providers.DefaultSessionStateProvider"/> </providers> </sessionState> ``` However, using this gives me an error as the provider needs to have a `connectionStringName` attribute. For Azure table storage, what should this look like?

Original source