0

I am hoping someone can shed some light on this situation. I have a WEB API that I am running in IIS Express. I was using it with SSL enabled. I have a console application that calls it like so:

https://localhost:12345/api/Controller/Method/arg

This was working great up until today. All of a sudden the client throws an exception when trying to connect stating:

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

I have gone through and made sure that the IIS Express Development Certificate is in place under personal certificates. I have also done a repair on IIS Express. I also do not get this problem if I put the URL into Internet Explorer. I have no problem connecting to the WEB API when I go over normal HTTP. What would make this seemingly start happening for no reason?

Dave
  • 2,473
  • 2
  • 30
  • 55
  • 1) Were Windows updates installed on the computer between it working and not working? 2) What is the expiry date on the certifcate? – Andrew Morton Mar 16 '17 at 19:42
  • The certificate is good until March 2022. No Windows updates have been installed, but I did upgrade the Azure SDK for an unrelated project. – Dave Mar 16 '17 at 19:46

1 Answers1

4

Misha Beskin's answer to this question resolved it for me. Still no idea what caused it to get messed up in the first place.

After spending a lot of time for me the solution was pretty simple

I just opened the Certmgr.msc ---> deleted the localhost certificate from the Trusted Root certification authorities.

Then opened my solution (after I had run the identity sever) clicked run the visual studio asked fro me if I want generate new certificate to iis express (ssl), I had clicked yes and then it started to work properly:)

Community
  • 1
  • 1
Dave
  • 2,473
  • 2
  • 30
  • 55