smwikipedia
smwikipedia

Reputation: 64433

No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization

I didn't specify any transport in hubConnection.start(), but I still got the transport failure. I am using IE 10 and IIS 8.0. Could anyone tell me what's wrong?

The code to connect to SignalR server:

    $(document).ready(function () {
        var hubConnection = $.hubConnection("http://myserver.com:8031");
        var notificationHub = hubConnection.createHubProxy("Notification");
        hubConnection.logging = true;

        notificationHub.on("calculationResultReceived", function (result) {
            addLog("Time elapsed: " + result.timeElapsed + ", finalResult: " + result.finalResult+ ", ID: " + result.jobId);
            }
        });

        hubConnection.start().done(function () {
            notificationHub.invoke("Echo")
                .done(function (msg) { addLog("Notification hub connection established successfully" + "\n" + msg); })
                .fail(function (message) { addLog("Failed to register push channel"); });
        }).fail(function (message) {
            addLog("The connection cannot be established: " + message)
        });
    });

The console log of the IE10:

[23:10:06 UTC+0800] SignalR: Client subscribed to hub 'notification'. [23:10:06 UTC+0800] SignalR: Negotiating with 'http://myserver.com:8031/signalr/negotiate?connectionData=%5B%7B%22name%22%3A%22notification%22%7D%5D&clientProtocol=1.3'. [23:10:07 UTC+0800] SignalR: This browser doesn't support SSE.
[23:10:07 UTC+0800] SignalR: Binding to iframe's load event.
[23:10:12 UTC+0800] SignalR: foreverFrame timed out when trying to connect. [23:10:12 UTC+0800] SignalR: Stopping forever frame.
[23:10:12 UTC+0800] SignalR: Opening long polling request to 'http://myserver.com:8031/signalr/connect?transport=longPolling&connectionToken=c39XZZSbiQZDnXbf6vOm8zt8wTQrStyPg8qchxWFevyp9BN2yxslU6YAahRdrsy7W0LOc%2BW5FMfRhQe10o%2B2ihlprs9803heDkD2S1Qo4j8oI1kmUA5fPXoBlcP3Ygrk&connectionData=%5B%7B%22name%22%3A%22notification%22%7D%5D&tid=6'. [23:10:17 UTC+0800] SignalR: longPolling timed out when trying to connect. [23:10:17 UTC+0800] SignalR: Aborted xhr request.
[23:10:17 UTC+0800] SignalR: Stopping connection. [23:10:17 UTC+0800] SignalR: Fired ajax abort async = true.

ADD 1

I checked my IIS8 installation, and enabled the WebSocket feature. But still the same error, though the error message changed a bit. enter image description here

Upvotes: 4

Views: 9121

Answers (1)

bozydarlelutko
bozydarlelutko

Reputation: 591

Try to diable browserlink feature in Visual Studio. To disable browserlink click Browser Link dropdown and uncheck Enable Browser Link (Using Browser Link in Visual Studio 2013).

(Source: github.com/SignalR, author: netsrotr)

Upvotes: 0

Related Questions