【问题标题】:SocketIO4Net - Error initializing handshake with https://localhost/SocketIO4Net - 使用 https://localhost/ 初始化握手时出错
【发布时间】:2016-08-15 23:47:12
【问题描述】:

我正在尝试使用 SocketIO4Net 通过 socket.io 连接我的 node.js 服务器。

在 HTTPS 方面似乎无法正常工作。 得到这个:使用https://localhost/初始化握手时出错

在其他类似问题中找不到解决方案。 如果您有其他解决方案可以从 C# 连接到 socket.io 套接字,请随时分享信息。

【问题讨论】:

    标签: socket.io socketio4net


    【解决方案1】:

    .NET 似乎阻止了我的自签名证书。 实现 RemoteCertificateValidationCallback 似乎可以解决问题。

    ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(pass);

    private static bool pass(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) { return true; }

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-04
      • 2013-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-14
      • 1970-01-01
      • 2020-06-12
      相关资源
      最近更新 更多