简体   繁体   中英

How to export “IIS Express Development Certificate” to another computer to connect to local IIS via https connection?

My goal is to test my Web Application via the HTTPS connection accessible from another computer on my local network. I have already installed the IIS Express Development Certificate on the computer where I develop the application, so when I open my site from the Visual Studio using a URL as such:

https://localhost:44234/MyWebApp/Index.aspx

It opens in a web browser just fine.

I also exported & then imported that IIS Express Development Certificate to another computer on the local network & added it to Certificates (Local Computer)/Trusted Root Certification Authorities node.

But the issue is that to access this web app from another local computer (hosted in IIS) I have to use the host computer's IP, as such:

https://192.168.1.234:44234/MyWebApp/Index.aspx

but that creates the following cert warning in a web browser:

在此处输入图片说明

So is there a way to make this work on another local computer?

That certificate was issued to localhost (CN, aka common name) which is only valid on the machine itself.

To suppress the warning, you cannot use such certificates, but one that has the machine name as CN. Then the host name in browser's URL matches the certificate's CN, and the warning will go away.

通过按照这些这些说明使用SelfSSL工具创建自签名证书(具有特定的CN),可以解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM