需要在初始化时,重新对 Resolver 赋值一个新的实例:
public class Startup { public void Configuration(IAppBuilder app) { var hubConfiguration = new HubConfiguration {Resolver = new DefaultDependencyResolver()}; app.MapSignalR(hubConfiguration); } }
参考:https://stackoverflow.com/questions/23759813/signalr-client-is-reconnected-after-owin-restart-but-message-is-not-published