Last post Jan 28, 2017 12:17 PM by Geeds
Jan 27, 2017 10:57 PM|Geeds|LINK
The following code gives an error on the 'start'
using knockout and MVCvar viewModel = new testViewModel(),
hub = $.connection.testHub;
$.connection.hub.start();the '\signalr\hubs' script is referenced in the page, and generated by the server. I can see this in the debugger, and also hub actually gets the value of .testHub.But the start fails with the error SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'></script>."So I guess somehow this did not get replaced. Interesting that the error mentions /signalr/js, while I believe the reference should be /signalr/hubs/Anyway, I can see the generated script in the debugger, but there I don't see a replace of this start function. What am I doing wrong?Thanks Ben
Jan 28, 2017 08:18 AM|ignatandrei|LINK
the '\signalr\hubs' script is referenced in the page
1 .Please show code.
2. please make sure you use @Url.Content
Jan 28, 2017 12:17 PM|Geeds|LINK
Just removed my code, found out that the problem was caused by a mix of old and newer assemblies/nugget etc. That's what you get when you start with an (too) old example found somewhere. Sorry.