Note that there are some explanatory texts on larger screens.

plurals
  1. POSignalR returns 'HubName' is undefined
    primarykey
    data
    text
    <p>Im trying SignalR and I'm getting javascript error: Status is undefined. The Status is my hub and it is defined as:</p> <pre><code>namespace SignalRDemo { public class Status : Hub, IDisconnect, IConnected { public Task Disconnect() { return Clients.leave(Context.ConnectionId, DateTime.Now.ToString()); } public Task Connect() { return Clients.joined(Context.ConnectionId, DateTime.Now.ToString()); } public Task Reconnect(IEnumerable&lt;string&gt; groups) { return Clients.rejoined(Context.ConnectionId, DateTime.Now.ToString()); } } } </code></pre> <p>When I try url <a href="http://localhost:16476/signalr/hubs" rel="nofollow">http://localhost:16476/signalr/hubs</a>, i have received the javascript code, but there is missing Status hub instance.</p> <p>I have referenced the following assemblies: SignalR.dll, Newtonsoft.Json.dll, WebActivator.dll, Microsoft.Web.Infrastructure.dll</p> <p>My default.aspx site looks like:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=Edge" /&gt; &lt;script src="/Scripts/jquery-1.6.4.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/Scripts/json2.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/Scripts/jquery.signalR.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript" src='&lt;%= ResolveClientUrl("~/signalr/hubs") %&gt;'&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(function () { var status = $.connection.status; status.joined = function (id, when) { if ($.connection.hub.id === id) { addMessage(id, 'blue'); } addMessage(id + ' joined at ' + when, 'green'); }; status.rejoined = function (id, when) { addMessage(id + ' reconnected at ' + when, 'purple'); }; status.leave = function (id, when) { addMessage(id + ' left at ' + when, 'red'); }; function addMessage(value, color) { $('#messages').append('&lt;li style="background-color:' + color + ';color:white"&gt;' + value + '&lt;/li&gt;'); } $.connection.hub.start({ transport: activeTransport }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;ul id="messages"&gt; &lt;/ul&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>This example is copied from the official SignalR examples. I have created my own asp.net web application and put the code there. Can somebody to navigate me what I miss please?</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.
 

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