Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After installing VS 2015 Update 3, sending HTTPS request to WebAPI development IIS Express causes SocketException

I have a Desktop client making HTTPS requests to a WebServer hosted in Visual Studio IIS Express environment. I have been developing using VS 2015 Update 2 for several months and things have worked without issues.

However, yesterday I installed VS 2015 Update 3. First I had to install the locally issued SSL certificate on my computer (I'm fairly certain I didn't have to do this with Update 2). But once that was out of the way, things were working fine.

When I turned on my machine today and loaded my development environment, I get the following chain of exceptions when sending the HTTPS request:

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

I have not made any other changes to my dev environment except upgrading Resharper from 9.2 to 2016.1, but I can't imagine that having anything to do with my issues.

Does anyone have any idea what could be causing my issues?

Update:

I don't get the Exceptions if I don't use SSL. So is seems to be some change to the IIS Express used by Visual Studio 2015 Update 3 which causes some SSL issues.

like image 240
Eirik Fauske Avatar asked Jun 29 '16 06:06

Eirik Fauske


2 Answers

I don't know about IIS Express, but I experienced the same issue on IIS. It turned out that the certificate was unlinked from the https bindings during Update 3 installation, and I had to reenable it by choosing IIS Express Development Certificate.

Another answer may perhaps lead you in the right direction concerning IIS Express.

like image 146
Dag Baardsen Avatar answered Oct 20 '22 00:10

Dag Baardsen


It seems that my problem was caused by an incorrect approach to adding the new IIS Express 10.0 self signed SSL certificate as a trusted certificate.

Following "Resolution Number #1" in this blog post solved it for me: https://blogs.msdn.microsoft.com/robert_mcmurray/2013/11/15/how-to-trust-the-iis-express-self-signed-certificate/

like image 33
Eirik Fauske Avatar answered Oct 20 '22 00:10

Eirik Fauske