RedisSessionStateProvider ERR unknown command 'EVAL'

我们两清 提交于 2019-12-21 04:29:20

问题


When I run Microsoft.Web.Redis.RedisSessionStateProvider locally, I get the following error:

StackExchange.Redis.RedisServerException: ERR unknown command 'EVAL'

I have installed the latest RedisSessionStateProvider from nuget.

Web config:

 <sessionState mode="Custom" customProvider="MySessionStateStore">
  <providers>

    <add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="" accessKey="" ssl="false" />
  </providers>
</sessionState>

回答1:


I was running a version of redis server pre 2.6.

Quick easy way to get redis server for windows is via chocolatey.

Install from here: https://chocolatey.org/

Then get redis using command from here: https://chocolatey.org/packages/redis-64/3.0.501

Then go to C:\ProgramData\chocolatey\lib\redis-64 and run redis-server.exe

You'd then need to install as a service (see notes in C:\ProgramData\chocolatey\lib\redis-64)

OR just get a windows installer msi from here (even easier if you don't mind the version too much i.e. just for development) https://github.com/MSOpenTech/redis/releases




回答2:


You should upgrade your Redis as @SSED said. You can download 32 bit version of redis here: https://github.com/cuiwenyuan/Redis-Windows-32bit

Also if there is another error "Active machine refused It" you should run redis-server.exe file after downloading it.



来源:https://stackoverflow.com/questions/35614066/redissessionstateprovider-err-unknown-command-eval

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!