I'm evaluating SignalR technology for use in our new product (mobile web application for the broad audience, among other things it needs a real-time chat on some pages).
I've followed the guide to create a very basic chat demo. Then I deployed the demo on my IIS, and started chatting to myself. All clients were on the same WiFi network.
Desktop browsers worked more or less OK.
However, Safari on iOS 4.2, and IE on WP7.10 - they both sucked. Sometimes nothing happened when I pressed the "post" button. Sometimes outgoing messages were sent OK to the desktop firefox, however there was no ining messages.
Maybe I'm missing something obvious? Maybe I need jquery mobile instead of the normal one? Maybe I should just tune the IIS/web.config/whatever, and the SignalR will flourish and start to work flawlessly even through the crappy mobile internet?
Or does it mean that since it doesn't work even while on WiFi within a single hop from the web server, I should throw SignalR away and just write some JavaScript to poll a JSON endpoint for new messages?
Thanks in advance!
I'm evaluating SignalR technology for use in our new product (mobile web application for the broad audience, among other things it needs a real-time chat on some pages).
I've followed the guide to create a very basic chat demo. Then I deployed the demo on my IIS, and started chatting to myself. All clients were on the same WiFi network.
Desktop browsers worked more or less OK.
However, Safari on iOS 4.2, and IE on WP7.10 - they both sucked. Sometimes nothing happened when I pressed the "post" button. Sometimes outgoing messages were sent OK to the desktop firefox, however there was no ining messages.
Maybe I'm missing something obvious? Maybe I need jquery mobile instead of the normal one? Maybe I should just tune the IIS/web.config/whatever, and the SignalR will flourish and start to work flawlessly even through the crappy mobile internet?
Or does it mean that since it doesn't work even while on WiFi within a single hop from the web server, I should throw SignalR away and just write some JavaScript to poll a JSON endpoint for new messages?
Thanks in advance!
Share Improve this question asked Mar 1, 2012 at 0:52 SoontsSoonts 22k10 gold badges66 silver badges142 bronze badges 2- 1 I too have encountered this issue. Very interested in any answers. (is there no subscribe button so I don't need to leave a ment) – tgmdbm Commented Mar 4, 2012 at 10:43
- 1 @tgmdbm you can follow the question by RSS. The RSS feed for this question is: stackoverflow./feeds/question/9509124 – Lasse Christiansen Commented Apr 7, 2012 at 11:45
2 Answers
Reset to default 6I have been developing an app with phonegap (that means that uses the Safari browser) and SignalR for Android and IPhone. The major issue I had was with iOS 6.x because SignalR did not connect with default config. I have found a workaround for that and I had explained it here. Let me know if you find it useful.
This code will simulate a connect, check for messages, disconnect and wait 5 secs to solve the iOS issue.
In js add
$.connection.hub.start({ transport: 'longPolling' }).done(function (myHubConnection) { });
and in Application_Start() add
GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(1);
Microsoft.AspNet.SignalR.Transports.LongPollingTransport.LongPollDelay = 5000;
RouteTable.Routes.MapHubs();
Not all mobile browsers (e.g. android, opera mini) support websockets. You'll find a nice chart of supporting browsers at http://www.hanselman./blog/YourUsersDontCareIfYouUseWebSockets.aspx