Note that there are some explanatory texts on larger screens.

plurals
  1. POSignalR's $.hubConnection() not working
    primarykey
    data
    text
    <p>I'm trying to implement a chat module in an ASP.NET MVC 4 application based on <a href="http://geekswithblogs.net/jeroenb/archive/2011/12/14/signalr-starter-application.aspx" rel="nofollow">an example over here</a>. Since this one's not using the latest SignalR version (0.5.3), I had to tweak the code to make it work.</p> <p>Problem is, I couldn't even get the hubConnection to work. I'm encountering a JS error that says:</p> <pre><code>Uncaught TypeError: Object function ( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } has no method 'hubConnection' </code></pre> <p>I'm not sure why there's no hubConnection method. I have the latest jQuery and SignalR libraries, and I just followed the SignalR 0.5.3 release notes <a href="http://blogs.msdn.com/b/webdev/archive/2012/08/22/announcing-the-release-of-signalr-0-5-3.aspx" rel="nofollow">here</a>. Here's a snippet of the generated code in my View:</p> <pre><code>&lt;script src="/Scripts/jquery-1.8.2.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/jquery.signalR-0.5.3.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/signalr/hubs"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(function () { var connection = $.hubConnection(); var chatHubClient = connection.createProxy("chatHub"); connection.start(function () { chatHubClient.join('TEST'); }); }); &lt;/script&gt; </code></pre> <p>I hope someone can point me to the right direction. Thanks.</p>
    singulars
    1. This table or related slice is empty.
    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