title: websocket secure connection wss://localhost:443/ not making a connection to server
body: <p>I have a client server application, but when I try to make a WSS connection, it gives me an error. </p>
  
  <pre><code>static void Main(string[] args)
          {
              Connect("wss://localhost:8080/WebsocketHttpListenerDemo").Wait();
              Console.WriteLine("Press any key to exit...");
              Console.ReadKey();
          }
  
  public static async Task Connect(string uri)
          {
              Thread.Sleep(6000); //wait for a sec, so server starts and ready to accept connection..
  
              ClientWebSocket webSocket = null;
              try
              {
                  webSocket = new ClientWebSocket();
                  await webSocket.ConnectAsync(new Uri(uri), CancellationToken.None);
                  await Task.WhenAll(Receive(webSocket), Send(webSocket));
              }
              catch (Exception ex)
              {
                  Console.WriteLine("Exception: {0}", ex);
              }
          finally
          {
              if (webSocket != null)
                  webSocket.Dispose();
              Console.WriteLine();
              Console.WriteLine("WebSocket closed.");
          }
      }
  </code></pre>