/signalr/hubs 404 not found after update to MVC5

后端 未结 3 1786
心在旅途
心在旅途 2021-01-12 15:57

SignalR was working while project was ASP.NET MVC3. Now i upgraded it to MVC5 (not so easy to do, I must tell you).

Then I noticed that signalR was not working. I we

3条回答
  •  走了就别回头了
    2021-01-12 16:24

    The SignalR js versions are supposed to be the same, but can be different. As a side effect you will find that error in browser console.

    Check the version of SignalR library in Scripts folder and the one referenced in your view.

    • ~/Scripts/jquery.signalR-2.1.0.min.js (SignalR tutorial);
    • jquery.signalR-2.2.1.min.js is installed into scripts folder (nuget installation: install-package Microsoft.AspNet.SignalR).

    Sometimes the most evident things are left unnoticed.

提交回复
热议问题