【发布时间】:2017-08-11 21:51:12
【问题描述】:
当我将 useHttps 属性设置为 true 时,我无法访问服务器。
服务器的实例化如下所示:
class Listener
{
RestServer server;
public Listener()
{
server = new RestServer();
server.Port = "8137";
server.UseHttps = true;
}
}
服务器启动,控制台输入告诉我它正在侦听https://localhost:8137,但是当我尝试发出请求(在 Fiddler 中)时,我收到错误消息:502 Fiddler - Connection Failed。
The connection to 'localhost' failed.
System.Security.SecurityException Failed to negotiate HTTPS connection with server.fiddler.network.https> HTTPS handshake to localhost (for #38) failed. System.IO.IOException Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. < An existing connection was forcibly closed by the remote host
对我来说,HTTPS 和证书可能存在问题。但是我在哪里可以指定证书?
【问题讨论】: