New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WP7: SignalR opens 1 connection per second, using both long polling and server sent events #910
Comments
You're using SignalR 0.5.1 (not sure which package version), you should use 0.5.3 if you're not.
SignalR and Fiddler:https://github.com/SignalR/SignalR/wiki/Using-fiddler-with-signalr |
Experiencing the same issue as continious requests transport=serverSentEvents then two of transport=longPolling and again each couple of second. Running the WP and AspNet samples from SignalR/samples as client and host respectively. |
I have implemented a workaround, by forcing longpolling: var longp = new SignalR.Client.Transports.LongPollingTransport(); |
We don't support WP7 anymore. |
@cspare, you've made my day, the workaround does work preventing from reconnects. Was just confused with intercepted requests implying the long polling transport. Now just wondering why this does not work out of box expected in up-to-date samples code. |
I am using SignalR 5.1, which I got using NuGet. The client is a Windows Phone 7 app, so it is using "SignalR.Client.WP7". The server is hosted on IIS8. My development machine is Windows 8, the production machine is Windows Server 2012, also using IIS8, hosted on an Azure VPC. Both are showing the same behavior.
When I start my app, the SignalR functionality seems to work fine, but when I use Fiddler to inspect the actual data traffic I see some issues:
I continuously see 2 types of requests being made: One with transport=longPolling and one with transport=serverSentEvents
Both request types are fired to the server every 2 seconds. I was assuming that long polling would be able to keep connections open much longer?
SignalR doesn't use Websockets, which is enabled on the server and does work with another library (Websockets4Net). The client does submit the TryWebSockets parameter with true.
I'm especially curious about issue 1 and 2, as I'm worried that this behavior would give a heavy load on the server.
Edit: I have now also tried connecting to the same SignalR server using the JavaScript implementation. This actually does use Websockets. When I disable Websockets the long polling works perfectly, keeping the connection open for a long time.
The text was updated successfully, but these errors were encountered: