title: Websocket Server Behind IIS 7 Reverse Proxy
body: <p>I've build a WebSocket chat server using the hybi-17 spec using .NET 4.0 and Sockets. If the browser connects to the chat server on port 81, everything functions as it should. However due to company firewalls etc. - I need to browser to connect to port 80 as this needs to be accessible to every PC in the world. </p>
  
  <p>So I'm using <a href="http://blogs.iis.net/wonyoo/archive/2008/07/09/application-request-routing-arr-as-a-reverse-proxy.aspx">IIS 7 as a reverse proxy</a>. I have managed to get the browser to connect to <a href="http://ws://localhost/chatProxy">ws://localhost/chatProxy</a> on IIS 7 which then proxies the request to <a href="http://localhost:81/chatProxy">http://localhost:81/chatProxy</a> where the websocket server is listening.</p>
  
  <p>The Websocket server does the handshake and creates a socket for the connection, then goes back into a listening state. </p>
  
  <p>The problem is, on the client side the websocket "onopen" events is never triggered. It's as if IIS doesn't send the request back to the browser.</p>
  
  <p>Any help will be highly appreciated!!</p>
  
  <p>Thanks in advance!!</p>