0

I am developing a web site in Visual Studio 2013 using IISExpress and have enabled HTTPS creating a certificate thru Visual Studio. This has a known problem when running in Chrome as documented here VS 2017: All new/existing HTTPS web sites give a certificate error in Chrome.

The solution there uses a gist from here camieleggermont/UpdateIISExpressCertificate.ps1 to generate a new certificate and have it replace the old one.

I've tried running that but with no success.

I tried embedding the code in my page. I placed this code <script src="https://gist.github.com/camieleggermont/5b2971a96e80a658863106b21c479988.js"></script> in the html head tag like style links and meta tags.

When running I see the gist code in the background of the page and I still get the certificate error.

I tried putting that script tag in other places on the page with the same results.

What should I do to embed this and get it to run? Or how do I run it as a powershell command?

Also is there another alternative to solve the certificate problem in Chrome?

Thank you.

Dov Miller
  • 1,958
  • 5
  • 34
  • 46

1 Answers1

0

It would be much easier to use Jexus Manager (free and open source) to generate a self-signed certificate,

  • SHA256.
  • CN and SAN are set to the value you want.

Thus, it matches Chrome's requirements. Also you can easily add the certificate to trusted root in it,

https://blog.lextudio.com/why-chrome-says-iis-express-https-is-not-secure-and-how-to-resolve-that-d906a183f0

Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • Thank you Lex Li. I just saw your solution in the Visual Studio Community post on this subject. I understand that Jexus Manager is commercial and has to be bought. Is that correct? – Dov Miller Jun 15 '17 at 07:57
  • @DovMiller nope. It is free and open source. – Lex Li Jun 15 '17 at 12:36