I have a MVC5 project using signalr to perform updates to a list. Inside script.js, there is a variable link to defined as var link = $.connection.hub
. There is also a bundleconfig file to load the dependent scripts, signalr/jquery and jquery in the proper order of course.
The script /signalr/hubs
is loaded in from the html manually.
bundles.Add(new ScriptBundle("~/bundles/signalr").Include(
"~/Scripts/script.js",
"~/Scripts/jquery.signalR-2.0.2.min.js"));
When the VS 2013 Web project is run, it works fine until the project is copied over to another PC that it does not work as intended. The variable link
is undefined as $.connection
is undefined too ($
is defined though).
I presume that jquery.signalR-2.0.2.min.js
is not read or executed at all.
Questions:
- Might this have anything to do with the environment of the PCs? (Windows 7 is OK, Windows 8 is not OK)
- What could prevent
jquery.signalR-2.0.2.min.js
from running? - Does creating a new View/Controller play a part in the error (creating a view, using a layout page)?