【发布时间】:2020-07-31 03:32:47
【问题描述】:
我有一个 .net 4.5 MVC 应用程序,我最近移到了 AWS,因此我们需要在 Signalr 实现中添加一个背板。我已按照https://docs.microsoft.com/en-us/aspnet/signalr/overview/performance/scaleout-with-redis 中列出的步骤进行操作。我已经安装了 nuget 包,我当前的配置如下所示:
[assembly: OwinStartup(typeof(SignalrBootstrapper))]
namespace app
{
public class SignalrBootstrapper
{
public void Configuration(IAppBuilder app)
{
var scaleoutConfig = new RedisScaleoutConfiguration(ConnectionStrings.Redis, "appSignalrBackplane");
GlobalHost.DependencyResolver.UseStackExchangeRedis(scaleoutConfig);
// Any connection or hub wire up and configuration should go here
app.MapSignalR();
}
}
}
但是,它似乎不起作用。根本不再发送推送通知,我尝试使用 redis-cli 手动订阅频道,但没有发布任何内容。没有错误,我尝试手动将连接详细信息输入到UseStackExhangeRedis 函数中,而不是像链接的演示中那样使用RedisScaleoutConfiguration,但它没有帮助。
【问题讨论】:
标签: c# asp.net-mvc redis signalr signalr-backplane