Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Cross-domain issues in Chrome and FireFox #1323

jalchr opened this Issue · 8 comments

3 participants


I'm really sorry if this issue was mentioned before or solved.
We are using alpha1 release and we are observing the following behavior:

1) The hub is pointing to another domain from the one served by the page.
2) When the page first loads, the negotiate and connect both return 200 (works)
3) On consecutive calls, the "connect" returns 503. Need to mention that we use "long Polling" as our default protocol.

Please take note.


Can you create a project that demonstrates the problem and send repro steps to do so? There's also a cross domain sample here as well. If you can repro it with that project let me know.


We used the sample for investigation and the following configuration causes the above error:

$.connection.hub.start({ transport: ['longPolling', 'webSockets'], jsonp: true }).done(function () {
$('#send').click(function () {

These two urls show the error online: (This works fine) (This is NOT working with cross domain)


I don't see the failure.


Hello mr. David,
In order to produce the problem on the test sites, please the follow these steps:

  • make sure you are using firefox or chrome (no problem on IE).
  • start the network monitor (on debugger or firebug).
  • open the site: which is the cross site.
  • wait for the first request to be timedout, (case of no messages within about 1 minute).
  • you will see that the first request (connect) is "canceled" and no new "connect" or "reconnect" appears. note: this is happening only in case of "jsonp=true"



That looks specific to azure. When using longpolling there's no keep alive and azure kills idle connections after a minute (that's by design). I'm guessing you don't see this locally. Anyways, here's my log using the latest version of chrome:



Now I'm totally confused. I opened the browser link you sent:

open the site: which is the cross site.

Look at the address bar in the image. The site that's loaded is the above url. It's also connected via jsonp longpolling.

So following your repro steps verbatim does NOT reproduce the problem for me. Take a look at the image closely again. If I missed something else let me know which part of the repro steps I missed.


yes, i was confused, it seems that the problem does not appears everywhere !!
we did tested it from a remote server, it works fine !!


It's likely something to do with the network you're behind killing connections that are idle after a minute. You could try setting the timeout to less than a minute in:

GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(35);
@davidfowl davidfowl closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.