Last post Dec 14, 2013 12:43 AM by gustavo_armenta
Nov 25, 2013 10:38 AM|arifkh|LINK
Microsoft.ASP.Net SignalR.Net.Client v2.0 and Microsoft.ASP.Net SignalR.SelfHost v2.0
I have a self-host hub server on port 8080 and a .Net client. I have noticed that when running the server and the client bits on Windows 2012 server, where it defaults to using web sockets transport, the client is not able to send messages to the server.
But it works the other way around and the messages sent from the server are received. Additionally this behavior can only be duplicated when SignalR uses web sockets transport. And it works when I manually set the transport to LongPolling.
The call from hubProxy.Invoke never completes. And no timeout either.
Nov 25, 2013 02:07 PM|gustavo_armenta|LINK
Could you try using https? It could be a problem with your network
Dec 09, 2013 09:58 PM|ekuns|LINK
I work with arifkh, so I have also looked into this issue. This is certainly not a network issue. I just ran WireShark (v 1.10.3) on both sides of this connection, on the client side and on the server side. For this test, I used Google Chrome
31.0.1650.63 m for the client -- though we see the same with IE 10 or FireFox 26.0. There are currently two WebSocket connections from the client to two different applications on the server side.
Looking in WireShark for "http.response.code == 101" I see both WebSocket connections on both sides of the capture. There are no missing packets on either side. Both sides of the capture agree on the count and sequence of packets.
One WebSocket connection is on port 80, to an application running under IIS, using SignalR Persistent Connection. This one succeeds and messages flow in both directions. The other WebSocket connection is on port 8080 to a self-hosted WinForms application,
using SignalR hubs. The WebSocket connection succeeds, and as far as the captures are concerned, messages flow in both directions. However, so far as the self-hosted application is concerned, messages only flow from the server to the client. The client-to-server
WebSocket messages are visible in WireShark (with the filter "websocket") but are not processed by the SignalR server-side application.
For the second SignalR connection, if we force long polling, it works and messages flow in both directions.
How can we go about figuring out where and why the incoming messages are dropped in SignalR?
Dec 11, 2013 07:13 PM|deaquino|LINK
I have the same problem, could you fix it?
I have a Windows Service Hosting an SignalR based in OWIN and I have the same problem, it does work the first invoke, because it's using longpulling, but when it creates the websockec connection, invokes don't work anymore...
Dec 12, 2013 11:05 AM|arifkh|LINK
Here is some more information on this problem. Its definately related to WinForms (as a host) and the SignalR websockets transport. I have no problems if the hub was hosted in a console app and websockets was used.
- On the hub, create a method that the client calls which will initialize a new form in WinForms (think chat application). A simple Application.Run(new MyForm()) will do.
- When the method completes execution, although the form shows, SignalR hangs. As far as the client is concerned the method never completed and it hangs as the Invoke call.
Why is this only a problem with SignalR web sockets transport and not with longPolling, etc?
Dec 14, 2013 12:43 AM|gustavo_armenta|LINK
Could you store your server and client code in this folder so I can repro?