Javascript etContext() { 返回wait_testHub.GetContext(); } /* 我还试着使用Abp通知系统, 数据库中的记录已创建,但我无法将其传输到客户端 */ [HttpPost] 公共异步任务订阅(int?tenantId,长用户ID) { wait_notificationSubscriptionManager.SubscribeAsync(新用户标识符(tenantId,userId),“App.SimpleMessage”); } [HttpPost] 公共异步任务TestNotificationAbp(字符串消息,长用户ID) { var identifier=newuseridentifier(1,userId);//tenantId=1 wait_notificationPublisher.PublishAsync( “App.SimpleMessage”, 新消息NotificationData(消息), 严重性:NotificationSeverity.Info, userid:new[]{identifier} ); 返回内容(“已发送通知:+消息”); } [HttpPost] 公共异步任务SendNotificationsAsync(UserNotification[]userNotifications) { //实现IRealTimeNotifier,但不清楚如何使用它。。。 抛出新的NotImplementedException(); } }

Javascript etContext() { 返回wait_testHub.GetContext(); } /* 我还试着使用Abp通知系统, 数据库中的记录已创建,但我无法将其传输到客户端 */ [HttpPost] 公共异步任务订阅(int?tenantId,长用户ID) { wait_notificationSubscriptionManager.SubscribeAsync(新用户标识符(tenantId,userId),“App.SimpleMessage”); } [HttpPost] 公共异步任务TestNotificationAbp(字符串消息,长用户ID) { var identifier=newuseridentifier(1,userId);//tenantId=1 wait_notificationPublisher.PublishAsync( “App.SimpleMessage”, 新消息NotificationData(消息), 严重性:NotificationSeverity.Info, userid:new[]{identifier} ); 返回内容(“已发送通知:+消息”); } [HttpPost] 公共异步任务SendNotificationsAsync(UserNotification[]userNotifications) { //实现IRealTimeNotifier,但不清楚如何使用它。。。 抛出新的NotImplementedException(); } },javascript,aspnetboilerplate,asp.net-core-2.2,asp.net-core-signalr,Javascript,Aspnetboilerplate,Asp.net Core 2.2,Asp.net Core Signalr,客户机不工作。错误: abp.signalr-client.js:5 Uncaught ReferenceError: signalR is not defined at abp.signalr-client.js:5 at abp.signalr-client.js:109 (anonymous) @ abp.signalr-client.js:5 (anonymous) @ abp.signalr-client.js:109 (index):38 Uncaught TypeE

客户机不工作。错误:

abp.signalr-client.js:5 Uncaught ReferenceError: signalR is not defined
    at abp.signalr-client.js:5
    at abp.signalr-client.js:109
(anonymous) @ abp.signalr-client.js:5
(anonymous) @ abp.signalr-client.js:109
(index):38 Uncaught TypeError: Cannot read property 'startConnection' of undefined 
我做错了什么?我也希望能回答上述问题。对不起我的英语


ASP.NET内核 使用abp.signal-client.js,它依赖于signal.js


参考资料:

ASP.NETMVC5 使用abp.signalr.js,这取决于信号器/集线器


参考资料:

可能的副本
abp.signalr-client.js:5 Uncaught ReferenceError: signalR is not defined
    at abp.signalr-client.js:5
    at abp.signalr-client.js:109
(anonymous) @ abp.signalr-client.js:5
(anonymous) @ abp.signalr-client.js:109
(index):38 Uncaught TypeError: Cannot read property 'startConnection' of undefined