来源引用网络文章
在ASP.NET提供的Session处理方法中,有以下四种模式:
1、 InProc模式
<system.web>
<sessionState mode="Custom" customProvider="RedisSessionStateProvider">
<providers>
<clear />
<add name="RedisSessionStateProvider"
type="Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider"
host="localhost:6379" clientType="pooled" />
</providers>
</sessionState>
</system.web>
clientType默认设为pooled连接池模式。若不使用连接池模式则修改为其他字符串(空也视为pooled模式)。
这个Provider有一个特点,不针对应用ID为Session加前缀,这正是我所需要的特性,更方便多个系统之间的Session共享。
如此这般使用Redis托管Session的工作就做完了。
ASP.NET下跨应用共享Session和使用Redis进行Session托管
原文:http://www.cnblogs.com/sam-yau/p/5415592.html