title: Chrome Remote Debugging using WebSocket
body: <p>I want to interact with chrome browser in my .Net application and I want to use WebSocket class (.Net 4.5) and Chrome Remote debugging protocol to achieve my task.</p>
  
  <p>I'm getting an error message saying "unable to connect to server" when I try to connect to websocket.</p>
  
  <p>This is my sample code. (I used <code>http://127.0.0.1:9220/json</code> to get the URI for chrome websocket and Platform is Windows 8)</p>
  
  <pre><code>class MyProgram
  {
      static void Main(string[] args)
      {
          MyProgram program = new MyProgram();
          program.ConnectToWebSocket();
  
          Console.ReadLine();
      }
  
      public async void ConnectToWebSocket()
      {
          var ws = new ClientWebSocket();
          var uri = new Uri("ws://127.0.0.1:9220/devtools/page/&lt;GUID&gt;");
          await ws.ConnectAsync(uri, CancellationToken.None);
      }
  }
  </code></pre>
  
  <p>This is working fine when I use <code>ws://echo.websocket.org/</code> as URI and I want to make it working for Chrome.</p>
  
  <p>Thanks.</p>