经过身份验证的 ServiceStack.Redis.PooledRedisClientsManager

发布于 2024-12-26 13:46:21 字数 264 浏览 4 评论 0原文

实例化 PooledRedisClientManager 时,如何指定 Redis 主机名的用户名和密码?

var _redis = PooledRedisClientManager("my.redishost.com:1234");

我特别需要将基于 .NET 的 ServiceStack.Redis 应用程序部署到 AppHarbor,并且我使用 Redis To Go 进行 Redis 托管。

How do I specify a username and password for the Redis hostname when instantiating a PooledRedisClientManager?

var _redis = PooledRedisClientManager("my.redishost.com:1234");

I specifically need to deploy a .NET-based ServiceStack.Redis application to AppHarbor and I'm using Redis To Go for Redis hosting.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

十雾 2025-01-02 13:46:21

https://github.com/ServiceStack/ServiceStack.Redis/wiki/Authentication

使用 Redis 进行身份验证密码,只需使用password@host语法传递到连接字符串:

container.Register(c => new PooledRedisClientManager("password@host:6379"));

https://github.com/ServiceStack/ServiceStack.Redis/wiki/Authentication

To authenticate with Redis using a password, simply pass in to the connection string using password@host syntax:

container.Register(c => new PooledRedisClientManager("password@host:6379"));
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文