VS 2013 WebForms template with bootstrap. And I've got
( used to try
ResolveClientUrl("~/signalr/hubs") etc... )
I used to try various variants and used to search a lot about this trouble but still can't find solution for now. When I check loaded page sources and click on
signalr/hubs I can see proxies loaded there and I also can see chat there.
But I still receive
Uncaught TypeError: Cannot read property 'chat' of undefined
$.connection is not set, then the SignalR initialization code in jquery.signalR-*.min.js is not running or at least not finishing as expected. A possible cause might be having multiple jQuery versions included on the page (the VS templates add a reference, so if you added another one manually, this might be the problem). In that case, the
window.$ instance which SignalR set itself up in is simply being replaced by the second jQuery initialization script which sets
If that is not it, you should try replacing the minified SignalR script with the unminified version. Then set breakpoints at the beginning of the code (e.g. on the first line with "use strict" within the anonymous function), and at a line that says
$.connection = $.signalR = signalR; or similar (towards the end).
If neither are hit, then the script is somehow not found at all. If the first one is hit, but the second one isn't, there is some other problem - you could trace it backwards from there. It might be a problem with how you create the Hub, or another configuration problem.
©2020 All rights reserved.