MongoDB ASP.NET Session Store Provider

联合创作 · 2023-09-28 18:59

MongoDB ASP.NET Session Store Provider 是 ASP.NET 将 Session 数据存储到 MongoDB 的开发包。


在 web.config 中的配置方法:


<configuration>
<connectionStrings>
<add name="MongoSessionServices" connectionString="mongodb://localhost" />
</connectionStrings>
<system.web>
<sessionState
mode="Custom"
customProvider="MongoSessionStateProvider">
<providers>
<add name="MongoSessionStateProvider"
type="MongoSessionStateStore.MongoSessionStateStore"
connectionStringName="MongoSessionServices"
writeExceptionsToEventLog="false"
fsync="false"
replicasToWrite="0" />
</providers>
</sessionState>
</system.web>
</configuration>
浏览 16
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报