I\'m using SignalR with ASP.NET Boilerplate .NET Core 3.1 but I encounterd this problem
Error: Failed to complete negotiation with the server: Error: Not Found<
That error is for connecting to /signalr
for AbpCommonHub
, used by ABP for real-time notifications.
ABP document: https://aspnetboilerplate.com/Pages/Documents/Notification-System#real-time-notifications
You should restore endpoints.MapHub<AbpCommonHub>("/signalr");
.
app.UseEndpoints(endpoints =>
{
endpoints.MapHub<AbpCommonHub>("/signalr"); // Restore this
endpoints.MapHub<MyChatHub>("/signalr-myChatHub");
endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
endpoints.MapControllerRoute("defaultWithArea", "{area}/{controller=Home}/{action=Index}/{id?}");
});
By the way, you can remove app.UseSignalR(...);
, which has been deprecated in favour of app.UseEndpoints(...);
.