我有一个桌面客户端向 Visual Studio IIS Express 环境中托管的 WebServer 发出 HTTPS 请求。几个月来,我一直在使用 VS 2015 Update 2 进行开发,并且一切正常。
但是,昨天我安装了 VS 2015 Update 3。
首先,我必须在我的计算机上安装本地颁发的 SSL 证书(我很确定我不必对 Update 2 执行此操作)。但一旦这一切都结束了,一切都很好。
今天打开机器并加载开发环境时,发送 HTTPS 请求时出现以下异常链:
HttpRequestException: An error occurred while sending the request.
WebException: The underlying connection was closed: An Unexpected error occurred on a send.
IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
SocketException: An existing connection was forcibly closed by the remote host
除了将 Resharper 从 9.2 升级到 2016.1 之外,我没有对我的开发环境进行任何其他更改,但我无法想象这与我的问题有任何关系。
有谁知道什么可能导致我的问题?
更新:
如果我不使用 SSL,我不会得到异常(exception)。似乎对 Visual Studio 2015 Update 3 使用的 IIS Express 进行了一些更改,这会导致一些 SSL 问题。
最佳答案
我不了解 IIS Express,但我在 IIS 上遇到了同样的问题。事实证明,在 Update 3 安装期间,证书与 https 绑定(bind)的链接已取消,我必须通过选择 IIS Express 开发证书重新启用它。
Another answer may perhaps lead you in the right direction关于 IIS Express。
关于asp.net-web-api - 安装 VS 2015 Update 3 后,向 Web API 部署 IIS Express 发送 HTTPS 请求导致 SocketException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38092378/