Note that there are some explanatory texts on larger screens.

plurals
  1. POError loading hubs
    primarykey
    data
    text
    <p>I am creating chat application using signalR. I have added signalr.js 1.0.1. I have created signalr hub in global.asax when application strarts like this:</p> <pre><code>RouteTable.Routes.MapHubs(new Microsoft.AspNet.SignalR.HubConfiguration() { EnableCrossDomain = true }); </code></pre> <p>But my problem is its showing me error like below sometimes.</p> <pre><code>Uncaught Error: SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. &lt;script src='/signalr/hubs'&gt;&lt;/script&gt;. </code></pre> <p><strong>EDIT:</strong> I have added all files for signalr dynamically</p> <pre><code>&lt;script lang="javascript" type="text/javascript"&gt; //add all js files for signalR chat dynamically to body function SetSignalRJs() { var fileref = document.createElement('script'); fileref.setAttribute("type", "text/javascript"); fileref.setAttribute("src", "Include/JS/JqueryPlugin/SignalR/jquery.signalR-1.0.1.js"); document.getElementsByTagName("body")[0].appendChild(fileref); } function SetHub() { var fileref = document.createElement('script'); fileref.setAttribute("type", "text/javascript"); fileref.setAttribute("src", "signalr/hubs"); document.getElementsByTagName("body")[0].appendChild(fileref); } function SetChatJs() { var fileref = document.createElement('script'); fileref.setAttribute("type", "text/javascript"); fileref.setAttribute("src", "Include/JS/CollectiveIntelligence/ChatApplication.js"); document.getElementsByTagName("body")[0].appendChild(fileref); } //apply timeout for all js files setTimeout(SetSignalRJs, 1000); setTimeout(SetHub, 5000); setTimeout(SetChatJs, 6000); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload