This project is read-only.

BE 2.7 and SignalR 1.0.1

Topics: Business Logic Layer, Themes
May 9, 2013 at 5:36 PM
Hi, I am integrating Signalr into my BE 2.7 app (did a test app with signalR to get all of the bits working first). The problem that I am having is, in IE 9 only, I get this error: "signalr error loading hubs. ensure your hubs reference is correct... ". This error is originating in jsauth.js. As I stated this is only in IE 9 (FF, chrome works fine). So to solve this, I had to turn off optimization and add the SignalR scripts at the bottom of the body tag so they were loaded after jquery. Is it something that I am missing to get this to work with optimization on? Has anyone played with signalR yet? I didn't include any code because as I said I tested it out in a sample app first so I know it works. BE seems to not resolve the "~/signalR/hubs" path when it adds the script to jsauth but like I said, it only happens in IE 9. Any insite would be greatly appreciated.
May 9, 2013 at 7:42 PM
Couple things to consider:
  1. You can add script to /Scripts folder (be 2.7, in 2.8 this changed to /Scripts/Auto). All scripts from there optimized, bundled and loaded in alphabetic order. You can rename script to load after others.
  2. You can go to optimized script location like /signalR/hubs and look at compressed version. Sometimes optimization has issues with JS syntax and can't compress it, then you should see error message right there and can try to fix it.
May 9, 2013 at 10:18 PM
Thanks for the reply.
I got it working with optimization turned on. All I needed to do was to place the include for signalr/hubs at the bottom of the body tag. Since that script is created dynamically by the signalR assy, it was, for some reason being loaded before the signalr script even though it was placed below it in the head section. It's funny though, IE was the only browser that complained about it.
Again thanks.