Question

I deployed the SignalR samples application on a Windows 2012, IIS 8 server.

I installed WebSocket protocol support as described here: http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support

But I still can't connect using WebSockets. Here is the application I deployed: http://machines-staging.dgplatformer.net/SignalRSamples/Hubs/HubConnectionAPI/

And the message log:

[20:05:12 GMT-0200 (E. South America Daylight Time)]: disconnected => connecting undefined
[20:05:12 GMT-0200 (E. South America Daylight Time)]: connecting => connected 49b8a6d4-41ef-4ff8-8f3d-8e1a513649bb
[20:05:12 GMT-0200 (E. South America Daylight Time)]: 49b8a6d4-41ef-4ff8-8f3d-8e1a513649bb OnConnected
started transport: **serverSentEvents** 49b8a6d4-41ef-4ff8-8f3d-8e1a513649bb

I found this one deployed on Azure (to compare): http://signalr-test1.cloudapp.net:82/Hubs/HubConnectionAPI/

Log:

20:11:18 GMT-0200 (E. South America Daylight Time) stateChanged: disconnected => connecting
20:11:18 GMT-0200 (E. South America Daylight Time) starting state: connecting
20:11:19 GMT-0200 (E. South America Daylight Time) stateChanged: connecting => connected
20:11:19 GMT-0200 (E. South America Daylight Time) 68b036a9-4e08-49a4-b11c-9ba15718e2d9 OnConnected
20:11:19 GMT-0200 (E. South America Daylight Time) started transport: **webSockets** 68b036a9-4e08-49a4-b11c-9ba15718e2d9

What do I need to do to use WebScokets on our IIS8 server?

This is the IIS log:

Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken

2014-01-29 22:14:13 192.168.0.33 GET /SignalRSamples/signalr/connect transport=webSockets&connectionToken=5O27InctUL0WgtbDF6bF8BhVEzndWHHsxlcZV3Ov1Oi3XiReG5eLZmtvSjL3AoqoKAAIStCAIt8uAnPsBhqSe1aL24Uv0cnAv5%2FP%2BgsEseUC%2BOj2if%2Bl9DMsvc%2BkI3N7&connectionData=%5B%7B%22name%22%3A%22hubconnectionapi%22%7D%5D&tid=2 80 - 186.231.71.234 Mozilla/5.0+(Windows+NT+6.2;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/32.0.1700.76+Safari/537.36 - 400 0 0 155
Was it helpful?

Solution

Actually I found out that the problem is related to my office network, not with the server. I can connect using WebSockets with my smartphone using 3G network =)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top