13

I have an Azure VM running Windows Server 2012 R2.

I am trying to run a c# console application that utilizes TcpListener for websocket communication at port 8080. When I run my application locally it works fine. I get the initial GET request from the client and I can do the handshake and start sending data.

I copied over the .exe file for the console application to my server. However when I run the application in the server it doesn't work. I have defined the Inbound Firewall Rule for port 8080 on my Azure as well as on my server. When the console application is running on the server, I get the request from the client but it is not the initial GET request. Its gibberish (I don't know how else to explain that).

I have also installed WebSocket Protocol from the server manager.

David Makogon
  • 69,407
  • 21
  • 141
  • 189
nmess88
  • 420
  • 1
  • 4
  • 14
  • 3
    Do you know if websockets in general work from where you are? I keep seeing cases where (for example) corporate proxies/virus scanners etc break websockets. That would be one reason for it working locally vs not working across the internet. In that respect, [this website](http://websocketstest.com/) is a handy check. – James Thorpe Jul 06 '16 at 15:24
  • Thank you for your response James Thorpe. I went to the website and it says "Websockets seem to work for you!" and I have all the green checks for all the ports. – nmess88 Jul 06 '16 at 15:41
  • ok - at least that's one area that can be ruled out then! – James Thorpe Jul 06 '16 at 15:59
  • @JamesThorpe, any other suggestions I could try? – nmess88 Jul 06 '16 at 16:40
  • 1
    Can you show us the _gibberish_ you mention of? – evilSnobu Jan 11 '17 at 18:55
  • 3
    Is it possible that you might also need an outbound firewall rule? Since Websockets is two way? – Boz Jan 13 '17 at 00:05
  • Did you try to disable the firewall on your VM ? Just to be sure it is or not the cause... – Cyril Rebreyend Jun 05 '18 at 10:59
  • Are you using IIS? –  Dec 13 '19 at 00:41

0 Answers0