asp.net网站redis session配置灵异事件

1     <sessionState mode="Custom" customProvider="RedisSessionStateProvider">
2       <providers>
3         <clear/>
4         <add name="RedisSessionStateProvider" type="Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider" host="192.168.0.*:6379" clientType="pooled" />
6       </providers>
7     </sessionState>

配置以及类库都已经弄好了。

ServiceStack.Interfaces换了3个版本,都不行。

死活出问题:

提示

Could not load file or assembly 'ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Could not load file or assembly 'ServiceStack.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

 

如果没有报上面的问题,就会提示

Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider
报出的空指针异常。。。

打算换个
Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider版本试一下。
用nuget管理包工具把
Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider版本从1.4换成1.0。
搞定了。。。


转载于:https://www.cnblogs.com/imcac/p/5194516.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值