Some issues when using Signalr in cross domain #461

fantasia949 opened this Issue Jun 19, 2012 · 2 comments


None yet
2 participants

The first issue happend when using long pooling transport in IE9.

In jquery.signalr-0.5.1.js, line 447

  getUrl: function (connection, transport, reconnecting, appendReconnectUrl) {
        /// <summary>Gets thes url for making a GET based connect request</summary>
        var baseUrl = transport === "webSockets" ? "" : connection.baseUrl,
            url = baseUrl + connection.appRelativeUrl,

The point is connection.baseUrl points to origin domain, not the target domain.

The second issue happens when using websocket in all supported browsers

In jquery.signalr-0.5.1.js, line 606:

         protocol = info.protocol === "https:" ? "wss://" : "ws://";

          url = protocol +;

Once more, points to origin domain, not the target domain.

Try with the url has pattern like this:

//localhost (not include http:)


davidfowl commented Jun 20, 2012

Is that supposed to be a suggestion? Can you paste an entire code sample, or even better, send a pull request.

@ghost ghost assigned davidfowl Jun 24, 2012

@davidfowl davidfowl closed this in c2b98ad Jun 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment