您如何在本地主机上使用 https/SSL? [英] How do you use https / SSL on localhost?

查看:26
本文介绍了您如何在本地主机上使用 https/SSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在本地主机上的 Web 应用程序上设置 SSL.

我没有这方面的背景,希望得到指导.我已经完成了我的 web 应用程序的实现,我需要它在本地主机上使用 https,或者在我将它托管在服务器上时.

有什么想法吗?

问候.

解决方案

如果您有 IIS Express(使用 Visual Studio):

<块引用>

要在 IIS Express 中启用 SSL,您只需设置SSL在项目属性窗口中启用 = true".

请参阅

I would like to know how to setup SSL on my web application on the localhost.

I have no background in doing this, would appreaciate guidance. I already finished implementing my web application and i need it to use https on the localhost or while I host it on a server.

Any Ideas?

Regards.

解决方案

If you have IIS Express (with Visual Studio):

To enable the SSL within IIS Express, you have to just set "SSL Enabled = true" in the project properties window.

See the steps and pictures at this code project.

IIS Express will generate a certificate for you (you'll be prompted for it, etc.). Note that depending on configuration the site may still automatically start with the URL rather than the SSL URL. You can see the SSL URL - note the port number and replace it in your browser address bar, you should be able to get in and test.

From there you can right click on your project, click property pages, then start options and assign the start URL - put the new https with the new port (usually 44301 - notice the similarity to port 443) and your project will start correctly from then on.

这篇关于您如何在本地主机上使用 https/SSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆