Ric*_*ett 5 asp.net session azure azure-table-storage
在Azure中,会话不是粘性的,因此InProc当您有多个Web角色实例时,使用会话是不够的(您应该这样做,否则Windows Azure Compute SLA不会保证99.95%的正常运行时间.).
因此,我想将Azure表存储用于ASP.NET会话.我熟悉SQL Azure,但还没有使用Azure表存储.
我被告知,执行此操作的适当方法是使用ASP.NET Universal Providers以及少量web.config技巧.
到目前为止,我还没有能够实现这一目标.围绕这一主题有各种各样的帖子,但其中很多都指向使用Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider,这看起来像是发布的Universal Providers的前身.
目前,我的web.config sessionState部分看起来像这样:
<sessionState mode="Custom"
customProvider="TableStorageSessionStateProvider">
<providers>
<clear/>
<add name="TableStorageSessionStateProvider"
type="System.Web.Providers.DefaultSessionStateProvider"/>
</providers>
</sessionState>
Run Code Online (Sandbox Code Playgroud)
但是,使用它会给我一个错误,因为提供者需要有一个connectionStringName属性.
对于Azure表存储,这应该是什么样的?
| 归档时间: |
|
| 查看次数: |
1969 次 |
| 最近记录: |