如何在Win7上使用VS2010测试SSL切换
我开发了一个大型 Web 应用程序,并在旧的 Win2k3 服务器
上安装了 VS2008
。我现在已在 Win7 Pro
上安装了 Visual Studio 2010
,并且可以正常使用该应用程序。
我的 Web 应用程序的某些部分需要切换到 SSL
,这是他们在 Win2k3 服务器
上使用创建私有IIS
工具进行的操作。代码>SSL 证书。
但是,我现在需要对这些部分进行更改,并且现在需要能够在 VS2010
内部 Web 服务器上测试它,因为我不再有 开发 Web服务器
就像我以前一样。有什么办法可以做到这一点还是绝对不行?
I developed a large web application with VS2008
installed on an old Win2k3 server
. I now have Visual Studio 2010
installed on Win7 Pro
and work on the application fine.
Parts of my web application need to switch into and out of SSL
which they did on the Win2k3 server
using the IIS
tool that creates a private SSL
cert.
However I now need to make changes to those parts and now need to be able to test it on the VS2010
internal web server as I no longer have a dev web server
like I used to. Is there any way I can do this or is it definitely a no no?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请查看此处。其中提到:
由于此示例与 .Net Framework 4 相关,因此我假设 Visual Studio 2010 不支持 SSL。
编辑:好消息是您可以为 IIS 7.0(及更高版本)启用 SSL。您可以找到详细说明此处。
完成后,您应该能够通过 SSL 访问您的网站,但浏览器将显示一条警告,指出您的证书不受信任。但是,可以通过以下方式轻松解决此问题:
1) 您为网站创建的自签名证书的通用名称 (CN) 应与运行 IIS 的计算机名称匹配,并且您应使用该计算机名称访问该网站(https://computerName/ 不是 https: //localhost/ 或 https://IP/)
2) 从 IIS 导出证书并将其导入到浏览器证书存储。对于 Internet Explorer,必须将证书添加到本地计算机/受信任的根证书颁发机构的 Windows 证书存储中(使用 Windows 管理控制台)。对于其他浏览器,由于它们使用自定义证书存储,因此必须将证书导入到其特定位置。例如,如果使用 Firefox 导入证书,请转到“工具”->“选项”->“高级”->“加密”->“查看证书”->“权限”->“导入”。
Please take a look here. It is mentioned:
As this sample is related to .Net Framework 4, I assume that Visual Studio 2010 does not support SSL.
EDIT: The good news is that you can enable SSL for IIS 7.0 (and above). You can find detailed instructions here.
When are done you should be able to access your website over SSL, but browsers will display a warning that says that your certificate is not trusted. However, this can be easily solved in the following way:
1) The common name (CN) for the self-signed certificate that you create for the website should match the computer name that runs IIS and you should access the site using the computer name (https://computerName/ not https://localhost/ or https://IP/)
2) Export the certificate from IIS and import it in the browsers certificate stores. For Internet Explorer the certificate must be added to Windows Certificate Store at Local Computer / Trusted Root Certification Authorities (use Windows Management Console). For other browsers, because they use custom certificate store, the certificate must be imported in their specific location. For example, in case of Firefox to import a certificate go to Tools->Option->Advanced->Encryption->View Certificates->Authorities->Import.
随着VS2010SP1的发布& IIS Express 您现在可以调试使用 https/SSL 的代码,而无需使用完整的 IIS 服务器。
With the release of VS2010SP1 & IIS Express you can now to debug code that uses with https/SSL without having to use a FULL IIS server.