如何在开发环境中的https:// localhost上测试我的ASP.NET页面?

时间:2012-05-28 04:23:40

标签: asp.net web-applications ssl https localhost

  

可能重复:
  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浏览器中,其中包含以下地址:“http://localhost:59215/Default.aspx

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

如果是的话,有人可以给我一些步骤吗?

1 个答案:

答案 0 :(得分:11)

带有SP1的Visual Studio 2010现在具有IIS Express,允许您在SSL上运行。

见这里:http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx

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

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