如何在开发环境中在https://localhost上测试我的ASP.NET页? [英] How to test my ASP.NET page on https://localhost in a development environment?

查看:253
本文介绍了如何在开发环境中在https://localhost上测试我的ASP.NET页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
HTTPS与Visual Studio的内置ASP.NET开发服务器

Possible Duplicate:
HTTPS with Visual Studio's built-in ASP.NET Development Server

我正在用VS 2010 IDE编写一个C#,ASP.NET Web应用程序.我没有在此Windows 7计算机上安装IIS服务器.我对Web应用程序的所有测试均通过Visual Studio 2010随附的"ASP.NET开发服务器"进行.我的页面通常以如下地址加载到Web浏览器中:"

I'm writing a C#, ASP.NET web application with the VS 2010 IDE. I do not have the IIS server installed on this Windows 7 machine. All my testing of the web app goes through the "ASP.NET Development Server" that came with Visual Studio 2010. My pages usually load into the web browser with an adress like this: "http://localhost:59215/Default.aspx"

所以我的问题是,我可以使用HTTPS URL对其进行测试吗?

So my question is, can I test it with a HTTPS URL?

如果可以,有人可以给我步骤吗?

And if yes, can someone give me steps?

推荐答案

Visual Studio 2010 SP1现在具有IIS Express,它将允许您在SSL上运行.

Visual Studio 2010 with SP1 now has IIS Express, which will allow you run on SSL.

请参见此处: http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx

您还可以创建自签名证书,以避免购买证书时出现任何问题.

You can also create a self-signed certificate to avoid any issues with buying a certificate.

http://weblogs.asp.net/scottgu/archive/2007/04/06/tip-trick-enabling-ssl-on-iis7-using-self-signed-certificates.aspx

这篇关于如何在开发环境中在https://localhost上测试我的ASP.NET页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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