使用MongoDB来存储蓄所ASP.NET Session
jopen
12年前
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>