我已将项目引用到:
using Microsoft.AspNet.SignalR.Client;
using Microsoft.AspNet.SignalR.Client.Hubs;
using Microsoft.AspNet.SignalR.Hubs;
但是我在下一行中在主题中写了一个和错误:
private static HubConnection connection = new HubConnection(WebConfigurationManager.AppSettings["StatusMessageHubURL"]);
private static IHubProxy statusMessageHub = connection.CreateProxy(WebConfigurationManager.AppSettings["StatusMessageHubName"]);
我不知道缺少哪个dll,不胜感激吗?
答案 0 :(得分:1)
将方法HubConnection.CreateProxy更改为HubConnection.CreateHubProxy:https://docs.microsoft.com/en-us/previous-versions/aspnet/dn433660%28v%3dvs.118%29