Hi,
We've experienced problems with our webapplication in Azure. The main problem is that the Session State is somehow lost. This happens only sometimes, not always. Who can help me?
In order to run the webapplication in Azure, I've made a reference to AspProviders.dll (from the azure sdk C:\WAPTK\Labs\WindowsAzureDeploymentVS2010\Source\Assets\AspProviders\bin\Debug\AspProviders.dll), created a Connection String to the Azure Table Storage
(the session state is saved in the Table Storage) and added the web.config:
<sessionState mode="Custom" customProvider="TableStorageSessionStateProvider">
<providers>
<clear/>
<add name="TableStorageSessionStateProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider"
applicationName="MyWebAppblabla.WebRole"/>
</providers>
</sessionState>
Apparently, there is something wrong, because sometimes an error occurs:
Below you can find a stack trace:
User agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2; MS-RTC LM 8)
Client name: static.kpn.net
Date: 23-9-2011 8:05:01
Session status: exists = False
An unhandled exception has occurred:
Message: Value cannot be null.
Parameter name: InString
Stack trace:
at System.Convert.FromBase64String(String s)
at Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.GetSession(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions, Boolean exclusive) in C:\WAPTK\Labs\WindowsAzureDeploymentVS2010\Source\Assets\AspProviders\TableStorageSessionStateProvider.cs:line 770
at Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) in C:\WAPTK\Labs\WindowsAzureDeploymentVS2010\Source\Assets\AspProviders\TableStorageSessionStateProvider.cs:line 378
at System.Web.SessionState.SessionStateModule.GetSessionStateItem()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Suggestions are very much appreciated!
Best regards, Leonard