2

I wanted a very simple WebSocket sample in .NET 4.5 but haven't been able to get any examples/tutorials working. I'm beginning to think it's actually my system rather than the samples (some of them are out of date, referencing W8 RC, for example). So I'm trying to find out where something is not happening. I'm struggling to find the linkage between the client and server methods. For reference, I'm on a new install of Windows 8 Ultimate with all updates current, developing on VS2012 Ultimate with all updates current, using Firefox 23.0.1 and IE10.0.8.

The client below prompts for the username, allows the user to enter text, and clears the text after clicking the Send button. The server OnConnect fires after the user has entered their username - but that's all. The OnDisconnect never fires but that might be the client not terminating nicely. The Send method is never called - is this what chat.server.send() is supposed to call (even though the casing is different (doesn't change the outcome if I match them anyway))?

The Firefox network debugger shows periodic outbound GETs but nothing when clicking on the Send button. The referenced scripts seem to be ok.

Apologies for the long post: inevitably I've still forgotten something pertinent!

HtmlPage1.html:

<!DOCTYPE html>
<html>
<head>
<title>SignalR Simple Chat</title>
<style type="text/css">
    .container {
        background-color: #99CCFF;
        border: thick solid #808080;
        padding: 20px;
        margin: 20px;
    }
</style>
</head>
<body>
<div class="container">
    <input type="text" id="message" />
    <input type="button" id="sendmessage" value="Send" />
    <input type="hidden" id="displayname" />
    <ul id="discussion">
    </ul>
</div>
<!--Script references. -->
<!--Reference the jQuery library. -->
<script src="/Scripts/jquery-1.6.4.min.js" ></script>
<!--Reference the SignalR library. -->
<script src="/Scripts/jquery.signalR-1.1.3.js"></script>
<!--Reference the autogenerated SignalR hub script. -->
<script src="/signalr/hubs"></script>
<!--Add script to update the page and send messages.--> 
<script type="text/javascript">
    $(function () {
        // Declare a proxy to reference the hub. 
        var chat = $.connection.chatHub;
        $.connection.hub.logging = true;
        // Create a function that the hub can call to broadcast messages.
        chat.client.broadcastMessage = function (name, message) {
            // Html encode display name and message. 
            var encodedName = $('<div />').text(name).html();
            var encodedMsg = $('<div />').text(message).html();
            // Add the message to the page. 
            $('#discussion').append('<li><strong>' + encodedName
                + '</strong>:&nbsp;&nbsp;' + encodedMsg + '</li>');
        };
        // Get the user name and store it to prepend to messages.
        $('#displayname').val(prompt('Enter your name:', ''));
        // Set initial focus to message input box.  
        $('#message').focus();
        // Start the connection.
        $.connection.hub.error(function (error) {
            console.log('SignalR error: ' + error)
        });
        $.connection.hub.connectionSlow(function () {
            console.log('We are currently experiencing difficulties with the connection.')
        });
        $.connection.hub.start()
            .fail(function(){ console.log('Could not Connect!'); })
            .done(function () {
            console.log('Now connected, connection ID=' + $.connection.hub.id);
            $('#sendmessage').click(function () {
                // Call the Send method on the hub. 
                chat.server.send($('#displayname').val(), $('#message').val());
                // Clear text box and reset focus for next comment. 
                $('#message').val('').focus();
            });
        });
    });
</script>
</body>
</html>

Global.asax.cs:

using System;
using System.Web.Routing;

namespace WebSockets2
{
public class Global : System.Web.HttpApplication
{

    protected void Application_Start(object sender, EventArgs e)
    {
        var hubConfiguration = new HubConfiguration();
        hubConfiguration.EnableDetailedErrors = true;
        RouteTable.Routes.MapHubs(hubConfiguration);
    }

    protected void Session_Start(object sender, EventArgs e)
    {

    }

    protected void Application_BeginRequest(object sender, EventArgs e)
    {

    }

    protected void Application_AuthenticateRequest(object sender, EventArgs e)
    {

    }

    protected void Application_Error(object sender, EventArgs e)
    {

    }

    protected void Session_End(object sender, EventArgs e)
    {

    }

    protected void Application_End(object sender, EventArgs e)
    {

    }
}
}

ChatHub.cs:

using Microsoft.AspNet.SignalR;
using System.Diagnostics;

namespace WebSockets2
{
public class ChatHub : Hub
{
    public override System.Threading.Tasks.Task OnConnected()
    {
        Debug.WriteLine("Connected");
        return base.OnConnected();
    }

    public override System.Threading.Tasks.Task OnDisconnected()
    {
        Debug.WriteLine("Disconnected");
        return base.OnDisconnected();
    }

    public override System.Threading.Tasks.Task OnReconnected()
    {
        Debug.WriteLine("Reconnected");
        return base.OnReconnected();
    }

    public void Send(string name, string message)
    {
        // Call the broadcastMessage method to update clients.
        Clients.All.broadcastMessage(name, message);
    }
}
}

Code taken from this asp.net tutorial

IE10 console output with SignalR debugging on:

[16:33:06 PDT] SignalR: Negotiating with '/signalr/negotiate'. 
 [16:33:07 PDT] SignalR: Connecting to websocket endpoint 'ws://localhost:39302/signalr/connect?transport=webSockets&connectionToken=8vS3EiKSK94q4-vjGPzBM56zdJ2dNsOmlVXjEc5SoAN0Qjn5Dt0fKjLfrrAmZsV7DzRVIvR3RcVyZvg2ie4sBRyBxOB2hhq_MOUcfXgi-rKtinfCWsy-dlqdu7dbsHdw0&connectionData=%5B%7B%22name%22%3A%22chathub%22%7D%5D&tid=5' 
 [16:33:07 PDT] SignalR: Websocket opened 
 [16:33:07 PDT] SignalR: Now monitoring keep alive with a warning timeout of 13333.333333333332 and a connection lost timeout of 20000 
 Now connected, connection ID=f9c787db-f8f7-49f2-a220-130eefd7d384 
SCRIPT12030: WebSocket Error: Network Error 12030, The connection with the server was terminated abnormally

 SignalR error:  
 [16:33:17 PDT] SignalR: Unclean disconnect from websocket. 
 [16:33:19 PDT] SignalR: Closing the Websocket 
 [16:33:19 PDT] SignalR: Clearing hub invocation callbacks with error: Connection started reconnecting before invocation result was received. 
 [16:33:19 PDT] SignalR: webSockets reconnecting 
 [16:33:19 PDT] SignalR: Connecting to websocket endpoint 'ws://localhost:39302/signalr/reconnect?transport=webSockets&connectionToken=8vS3EiKSK94q4-vjGPzBM56zdJ2dNsOmlVXjEc5SoAN0Qjn5Dt0fKjLfrrAmZsV7DzRVIvR3RcVyZvg2ie4sBRyBxOB2hhq_MOUcfXgi-rKtinfCWsy-dlqdu7dbsHdw0&connectionData=%5B%7B%22name%22%3A%22chathub%22%7D%5D&tid=4' 
 [16:33:19 PDT] SignalR: Websocket opened 
SCRIPT12030: WebSocket Error: Network Error 12030, The connection with the server was terminated abnormally

 SignalR error:  
 [16:33:27 PDT] SignalR: Unclean disconnect from websocket. 
 [16:33:29 PDT] SignalR: Closing the Websocket 
 [16:33:29 PDT] SignalR: Clearing hub invocation callbacks with error: Connection started reconnecting before invocation result was received. 
 [16:33:29 PDT] SignalR: webSockets reconnecting 
 [16:33:29 PDT] SignalR: Connecting to websocket endpoint 'ws://localhost:39302/signalr/reconnect?transport=webSockets&connectionToken=8vS3EiKSK94q4-vjGPzBM56zdJ2dNsOmlVXjEc5SoAN0Qjn5Dt0fKjLfrrAmZsV7DzRVIvR3RcVyZvg2ie4sBRyBxOB2hhq_MOUcfXgi-rKtinfCWsy-dlqdu7dbsHdw0&connectionData=%5B%7B%22name%22%3A%22chathub%22%7D%5D&tid=0' 
 [16:33:29 PDT] SignalR: Websocket opened 

The "Unclean disconnect" to "SCRIPT12030" messages repeat every 10 seconds.

Found some logs from IIS:

#Software: Microsoft Internet Information Services 8.0
#Version: 1.0
#Date: 2013-09-09 19:09:52
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2013-09-09 19:09:52 ::1 GET /HtmlPage1.html - 22016 - ::1 Mozilla/5.0+(Windows+NT+6.2;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 - 200 0 0 12
2013-09-09 19:09:52 ::1 GET /Scripts/jquery-1.8.2.min.js - 22016 - ::1 Mozilla/5.0+(Windows+NT+6.2;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 http://localhost:22016/HtmlPage1.html 304 0 0 2
2013-09-09 19:09:52 ::1 GET /Scripts/jquery.signalR-1.0.0.js - 22016 - ::1 Mozilla/5.0+(Windows+NT+6.2;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 http://localhost:22016/HtmlPage1.html 304 0 0 2
2013-09-09 19:09:54 ::1 GET /signalr/hubs - 22016 - ::1 Mozilla/5.0+(Windows+NT+6.2;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 http://localhost:22016/HtmlPage1.html 200 0 0 2088
2013-09-09 19:09:56 ::1 GET /signalr/negotiate _=1378753796013 22016 - ::1 Mozilla/5.0+(Windows+NT+6.2;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 http://localhost:22016/HtmlPage1.html 200 0 0 57
2013-09-09 19:10:47 ::1 GET /HtmlPage1.html - 22016 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) - 200 0 0 4
2013-09-09 19:10:47 ::1 GET /Scripts/jquery.signalR-1.0.0.js - 22016 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) http://localhost:22016/HtmlPage1.html 304 0 0 2
2013-09-09 19:10:47 ::1 GET /Scripts/jquery-1.8.2.min.js - 22016 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) http://localhost:22016/HtmlPage1.html 304 0 0 3
2013-09-09 19:10:47 ::1 GET /signalr/hubs - 22016 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) http://localhost:22016/HtmlPage1.html 200 0 0 18
2013-09-09 19:10:51 ::1 GET /signalr/negotiate _=1378753851110 22016 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) http://localhost:22016/HtmlPage1.html 200 0 0 5

Hub trace, as per this article:

SignalR.HubDispatcher Information: 0 : The groups token is missing
SignalR.Transports.TransportHeartBeat Information: 0 : Connection is New=(http://localhost:22016/signalr?transport=webSockets&connectionToken=OW1sZ7-1IfaCEVTwDbhhYGoaRWzOO2x2ZWsr05HRCx0test0dwHAfKAO_RsiAF5Px0PqlwnBXruC1s7R-FT2WIGK7k6HYhwCHQvXKOdMIOhLanLIDt2XffrlRraRoB5K0&connectionData=[{"name":"chathub"}]&tid=4).
SignalR.MessageBus Information: 0 : Creating a worker, allocated=1, busy=0
SignalR.MessageBus Information: 0 : Work(d46bad02-f3c7-463f-b398-6a56726060ca)
Reconnected
SignalR.HubDispatcher Information: 0 : The groups token is missing
SignalR.Transports.TransportHeartBeat Information: 0 : Connection is New=(http://localhost:22016/signalr/connect?transport=webSockets&connectionToken=MtuTMlkThc5eny6GN-myKS9SEWXFIHrM_Qz_btqWsu8U6rDdlyJD8rJuc5YKtTtwR6V6bPlJBENs-jzW5-EjQJAk7xAz6EUdojYWqmaZ2kwMN7chX9zuxJ-lkYf-El6L0&connectionData=[{"name":"chathub"}]&tid=3).
SignalR.MessageBus Information: 0 : No need to add a worker because all allocated workers are not busy, allocated=1, busy=0
SignalR.MessageBus Information: 0 : Work(d46bad02-f3c7-463f-b398-6a56726060ca)
Connected
SignalR.Transports.TransportHeartBeat Information: 0 : KeepAlive(1e162d2d-505c-4e57-bd36-e3db16eb7045)
SignalR.Transports.TransportHeartBeat Information: 0 : KeepAlive(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
SignalR.HubDispatcher Information: 0 : The groups token is missing
SignalR.HubDispatcher Information: 0 : The groups token is missing
SignalR.Transports.TransportHeartBeat Information: 0 : Connection exists. Closing previous connection. Old=(False, http://localhost:22016/signalr/connect?transport=webSockets&connectionToken=MtuTMlkThc5eny6GN-myKS9SEWXFIHrM_Qz_btqWsu8U6rDdlyJD8rJuc5YKtTtwR6V6bPlJBENs-jzW5-EjQJAk7xAz6EUdojYWqmaZ2kwMN7chX9zuxJ-lkYf-El6L0&connectionData=[{"name":"chathub"}]&tid=3) New=(http://localhost:22016/signalr?transport=webSockets&connectionToken=MtuTMlkThc5eny6GN-myKS9SEWXFIHrM_Qz_btqWsu8U6rDdlyJD8rJuc5YKtTtwR6V6bPlJBENs-jzW5-EjQJAk7xAz6EUdojYWqmaZ2kwMN7chX9zuxJ-lkYf-El6L0&connectionData=[{"name":"chathub"}]&tid=0)
SignalR.Transports.TransportHeartBeat Information: 0 : Connection exists. Closing previous connection. Old=(False, http://localhost:22016/signalr?transport=webSockets&connectionToken=OW1sZ7-1IfaCEVTwDbhhYGoaRWzOO2x2ZWsr05HRCx0test0dwHAfKAO_RsiAF5Px0PqlwnBXruC1s7R-FT2WIGK7k6HYhwCHQvXKOdMIOhLanLIDt2XffrlRraRoB5K0&connectionData=[{"name":"chathub"}]&tid=4) New=(http://localhost:22016/signalr?transport=webSockets&connectionToken=OW1sZ7-1IfaCEVTwDbhhYGoaRWzOO2x2ZWsr05HRCx0test0dwHAfKAO_RsiAF5Px0PqlwnBXruC1s7R-FT2WIGK7k6HYhwCHQvXKOdMIOhLanLIDt2XffrlRraRoB5K0&connectionData=[{"name":"chathub"}]&tid=0)
SignalR.Transports.WebSocketTransport Information: 0 : End(1e162d2d-505c-4e57-bd36-e3db16eb7045)
SignalR.Transports.WebSocketTransport Information: 0 : End(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
SignalR.Transports.WebSocketTransport Information: 0 : Cancel(1e162d2d-505c-4e57-bd36-e3db16eb7045)
SignalR.MessageBus Information: 0 : No need to add a worker because all allocated workers are not busy, allocated=1, busy=0
SignalR.MessageBus Information: 0 : Work(d46bad02-f3c7-463f-b398-6a56726060ca)
SignalR.Transports.WebSocketTransport Information: 0 : Cancel(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
Reconnected
Reconnected
SignalR.Transports.WebSocketTransport Information: 0 : DrainWrites(1e162d2d-505c-4e57-bd36-e3db16eb7045)
SignalR.Transports.WebSocketTransport Information: 0 : DrainWrites(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
SignalR.Transports.WebSocketTransport Information: 0 : CompleteRequest(1e162d2d-505c-4e57-bd36-e3db16eb7045)
SignalR.Transports.WebSocketTransport Information: 0 : EndRequest(1e162d2d-505c-4e57-bd36-e3db16eb7045)
SignalR.Transports.WebSocketTransport Information: 0 : CompleteRequest(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
SignalR.Transports.WebSocketTransport Information: 0 : EndRequest(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
The thread '' (0x17b8) has exited with code 0 (0x0).
SignalR.HubDispatcher Information: 0 : The groups token is missing
SignalR.Transports.TransportHeartBeat Information: 0 : Connection is New=(http://localhost:22016/signalr/connect?transport=webSockets&connectionToken=v1aBCZ1PkjZxeg0WCmonfhqIM4B2Q_o4UpcbhdaVzH3UqvsM6gSuTwTYD4TNjWNTV7IhE0j3aQ0n1Oc33gI7UMfDFoOjiCXSSqakL3Rkv1TY7vm99FRp1YlcevxO0hl90&connectionData=[{"name":"chathub"}]&tid=4).
SignalR.MessageBus Information: 0 : No need to add a worker because all allocated workers are not busy, allocated=1, busy=0
SignalR.MessageBus Information: 0 : Work(d46bad02-f3c7-463f-b398-6a56726060ca)
Connected
SignalR.Transports.TransportHeartBeat Information: 0 : KeepAlive(1e162d2d-505c-4e57-bd36-e3db16eb7045)
SignalR.Transports.TransportHeartBeat Information: 0 : 71c9aa6b-98f2-40d9-8c38-253cffa9389e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : KeepAlive(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.HubDispatcher Information: 0 : The groups token is missing
SignalR.Transports.TransportHeartBeat Information: 0 : Connection exists. Closing previous connection. Old=(False, http://localhost:22016/signalr/connect?transport=webSockets&connectionToken=v1aBCZ1PkjZxeg0WCmonfhqIM4B2Q_o4UpcbhdaVzH3UqvsM6gSuTwTYD4TNjWNTV7IhE0j3aQ0n1Oc33gI7UMfDFoOjiCXSSqakL3Rkv1TY7vm99FRp1YlcevxO0hl90&connectionData=[{"name":"chathub"}]&tid=4) New=(http://localhost:22016/signalr?transport=webSockets&connectionToken=v1aBCZ1PkjZxeg0WCmonfhqIM4B2Q_o4UpcbhdaVzH3UqvsM6gSuTwTYD4TNjWNTV7IhE0j3aQ0n1Oc33gI7UMfDFoOjiCXSSqakL3Rkv1TY7vm99FRp1YlcevxO0hl90&connectionData=[{"name":"chathub"}]&tid=6)
SignalR.Transports.WebSocketTransport Information: 0 : End(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.Transports.WebSocketTransport Information: 0 : Cancel(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.Transports.WebSocketTransport Information: 0 : DrainWrites(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.MessageBus Information: 0 : No need to add a worker because all allocated workers are not busy, allocated=1, busy=0
SignalR.Transports.WebSocketTransport Information: 0 : CompleteRequest(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.Transports.WebSocketTransport Information: 0 : EndRequest(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.MessageBus Information: 0 : Work(d46bad02-f3c7-463f-b398-6a56726060ca)
Reconnected
SignalR.Transports.TransportHeartBeat Information: 0 : 71c9aa6b-98f2-40d9-8c38-253cffa9389e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 66d244c9-d5a4-45a3-8fe0-e0cd7548e29e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : KeepAlive(1e162d2d-505c-4e57-bd36-e3db16eb7045)
SignalR.Transports.TransportHeartBeat Information: 0 : 71c9aa6b-98f2-40d9-8c38-253cffa9389e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 66d244c9-d5a4-45a3-8fe0-e0cd7548e29e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 1e162d2d-505c-4e57-bd36-e3db16eb7045 is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 71c9aa6b-98f2-40d9-8c38-253cffa9389e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 66d244c9-d5a4-45a3-8fe0-e0cd7548e29e is dead
The thread '' (0x1b3c) has exited with code 0 (0x0).
SignalR.Transports.TransportHeartBeat Information: 0 : 1e162d2d-505c-4e57-bd36-e3db16eb7045 is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 71c9aa6b-98f2-40d9-8c38-253cffa9389e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 66d244c9-d5a4-45a3-8fe0-e0cd7548e29e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 1e162d2d-505c-4e57-bd36-e3db16eb7045 is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 71c9aa6b-98f2-40d9-8c38-253cffa9389e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 66d244c9-d5a4-45a3-8fe0-e0cd7548e29e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 1e162d2d-505c-4e57-bd36-e3db16eb7045 is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 71c9aa6b-98f2-40d9-8c38-253cffa9389e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : Removing connection 71c9aa6b-98f2-40d9-8c38-253cffa9389e
SignalR.Transports.WebSocketTransport Information: 0 : OnDisconnect(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
SignalR.Transports.WebSocketTransport Information: 0 : End(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
SignalR.Transports.WebSocketTransport Information: 0 : Cancel(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
SignalR.Transports.WebSocketTransport Information: 0 : DrainWrites(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
SignalR.Transports.WebSocketTransport Information: 0 : CompleteRequest(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
SignalR.Transports.WebSocketTransport Information: 0 : EndRequest(71c9aa6b-98f2-40d9-8c38-253cffa9389e)
Disconnected
SignalR.Transports.TransportHeartBeat Information: 0 : 66d244c9-d5a4-45a3-8fe0-e0cd7548e29e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 1e162d2d-505c-4e57-bd36-e3db16eb7045 is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 66d244c9-d5a4-45a3-8fe0-e0cd7548e29e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 1e162d2d-505c-4e57-bd36-e3db16eb7045 is dead
SignalR.Transports.TransportHeartBeat Information: 0 : 66d244c9-d5a4-45a3-8fe0-e0cd7548e29e is dead
SignalR.Transports.TransportHeartBeat Information: 0 : Removing connection 66d244c9-d5a4-45a3-8fe0-e0cd7548e29e
SignalR.Transports.WebSocketTransport Information: 0 : OnDisconnect(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.Transports.WebSocketTransport Information: 0 : End(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.Transports.WebSocketTransport Information: 0 : Cancel(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.Transports.WebSocketTransport Information: 0 : DrainWrites(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.Transports.WebSocketTransport Information: 0 : CompleteRequest(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
SignalR.Transports.WebSocketTransport Information: 0 : EndRequest(66d244c9-d5a4-45a3-8fe0-e0cd7548e29e)
Disconnected

Upon further investigation, adding:

$.connection.hub.start({ transport: 'longPolling' });

works - but I want to be using WebSockets, not long polling!

URL Method  Result  Type    Received    Taken   Initiator   Wait‎‎  Start‎‎ Request‎‎   Response‎‎  Cache read‎‎    Gap‎‎
http://localhost:39302/HtmlPage1.html   GET 304 text/html   317 B   16 ms   refresh 0   16  0   0   0   3624
/Scripts/jquery-1.10.2.js   GET 304 application/javascript  341 B   16 ms       16  0   16  0   0   3608
/Scripts/jquery.signalR-1.1.3.js    GET 304 application/javascript  348 B   16 ms       16  0   16  0   0   3608
/signalr/hubs   GET 200 application/javascript  3.73 KB 109 ms      16  0   109 0   0   3515
/signalr/negotiate?_=1378859920001  GET 200 application/json    0.77 KB 125 ms  XMLHttpRequest  2610    0   109 16  0   905

Absolutely nothing after the negotiate.

GeoffM
  • 1,603
  • 5
  • 22
  • 34
  • Your code looks fine, are trying to run on localhost or is your app deployed? Can you add the client console logs and network logs to your question. – N. Taylor Mullen Sep 09 '13 at 17:31
  • It's on localhost (trying to keep as simple as possible!). I've added logs from IE (can't seem to get them out of FF but I assume the output would be the same). Am trying to get server end logs... – GeoffM Sep 09 '13 at 19:04
  • Hub trace added. First output is "The groups token is missing" - no idea if that's significant. – GeoffM Sep 09 '13 at 19:26
  • It isn't relevant. You should really be using SignalR 1.1.3 not Signal R 1.0. – davidfowl Sep 10 '13 at 05:41
  • That's interesting. I followed the tutorial again from scratch and 1.0 was installed automatically. If I removed it and used nuget, 1.1.3 was installed instead. However, it's still not working! I need to analyse this version to see what's up. – GeoffM Sep 10 '13 at 22:31

0 Answers0