2881099 / FreeIM

.NETCore websocket 实现简易、高性能、集群即时通讯组件,支持点对点通讯、群聊通讯、上线下线事件消息等众多实用性功能.
MIT License
1.42k stars 418 forks source link

我给redis设置密码了,c#代码里面要怎么写? #40

Open zhaoguoping opened 3 years ago

zhaoguoping commented 3 years ago

redis我设置了密码,我要在配置在哪里?现在报错IM无法使用 "ImServerOption": { "CSRedisClient": "127.0.0.1:6379,idleTimeout=3000,poolsize=10", "Servers": "127.0.0.1:6001", "Server": "127.0.0.1:6001" },

2881099 commented 3 years ago

看 freeredis 文档介绍,设置密码

zhaoguoping commented 3 years ago

我的是csredis版本的,

zhaoguoping commented 3 years ago

"ImServerOption": { "CSRedisClient": "127.0.0.1:6379,Password=1111,idleTimeout=3000,poolsize=10", "Servers": "127.0.0.1:6001", "Server": "127.0.0.1:6001" },如上面,在ip端口后面,加上password=111,这样子不行啊

5653325 commented 3 years ago

"ImServerOption": { "CSRedisClient": "127.0.0.1:6379,Password=1111,idleTimeout=3000,poolsize=10", "Servers": "127.0.0.1:6001", "Server": "127.0.0.1:6001" },如上面,在ip端口后面,加上password=111,这样子不行啊

看CSRedisCore文档吧。

Camio1945 commented 8 months ago

试了一下,首字母是不能大写的,Password 改成 password 就可以了,比如: "CSRedisClient": "127.0.0.1:6379,password=1111,poolsize=10",