Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SignalR performs long polling instead of websocket in case of cross domain

When I connect to signalR hosted in same virtual directory, I get data via websocket transport. But in case of cross domain, long polling is getting used as a transport.

Here browser compatibility is not an issue as I am trying in Chrome browser.

What I can do to use websocket as a transport in case of cross domain.

I have tried every possible solution available on net, including available at signalR wiki.

https://github.com/SignalR/SignalR/wiki/SignalR-JS-Client-Hubs

like image 388
Hemang Dave Avatar asked Jan 24 '13 14:01

Hemang Dave


1 Answers

Thanks David for answering my question in the comments:

Because only IIS8 supports websockets and neither SSE or ForeverFrame works cross domain so you're stuck with long polling –

like image 193
Hemang Dave Avatar answered Sep 26 '22 06:09

Hemang Dave