IISExpress 找不到使用 Visual Studio 2013 运行本地主机的 ssl 页面 [英] IISExpress cannot find ssl page running localhost with Visual Studio 2013

查看:15
本文介绍了IISExpress 找不到使用 Visual Studio 2013 运行本地主机的 ssl 页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我以

确保删除任何以前的本地主机"证书,因为这些证书可能与 IIS Express 生成的证书冲突.我遇到了同样的错误(ERR_SSL_PROTOCOL_ERROR),在尝试了许多解决方案"后,我花了好几个小时才最终弄明白.我的错误是我创建了自己的本地主机"证书,其中有两个.我不得不删除两者并让 IIS Express 重新创建它.

以下是检查和删除本地主机"证书的方法:

在开始时,输入 -> mmc.exe,文件 -> 添加/删除管理单元...,选择证书 -> 添加> -> 计算机帐户 -> 本地计算机,在证书">个人">证书"下检查.确保存在的本地主机证书具有友好名称IIS Express 开发证书".如果没有,请将其删除.或者如果有多个,则全部删除.在 Visual Studio 上,选择项目并在属性选项卡下启用 SSL=true.保存、构建和运行.IIS Express 将生成一个新的本地主机"证书.

注意:如果它不起作用,请尝试以下操作:确保在 VS 项目上禁用 IIS Express 并在删除本地主机"证书之前停止其上所有正在运行的应用程序.此外,您可以转到控制面板 > 程序"并修复 IIS Express.

When I access the site as http://localhost:26049, the site runs fine. If I try to access the site with https://localhost:44319, I get page not found.

This is my project properties:

This is from my IISExpress application config:

<site name="MVC Authentication" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="F:ProjectsMySiteTest" />
    </application>
    <bindings>
        <binding protocol="https" bindingInformation="*:44319:localhost" />
        <binding protocol="http" bindingInformation="*:26049:localhost" />
    </bindings>
</site>

解决方案

Got solution from this post. Had to delete all localhost certificates and repair IIS Express. Thanks @ShaTin

https://stackoverflow.com/a/22818853/853295

Make sure to remove any previous 'localhost' certificates as those could conflict with the one generated by IIS Express. I had this same error (ERR_SSL_PROTOCOL_ERROR), and it took me many hours to finally figure it out after trying out many many "solutions". My mistake was that I had created my own 'localhost' certificate and there were two of them. I had to delete both and have IIS Express recreate it.

Here is how you can check for and remove 'localhost' certificate:

On Start, type -> mmc.exe, File -> Add/Remove Snap-in..., Select Certificates -> Add> -> Computer account -> Local computer, Check under Certificates > Personal > Certificates. Make sure the localhost certificate that exist has a friendly name "IIS Express Development Certificate". If not, delete it. Or if multiple, delete all. On Visual Studio, select project and under property tab, enable SSL=true. Save, Build and Run. IIS Express will generate a new 'localhost' certificate.

Note: If it doesn't work, try these: make sure to disable IIS Express on VS project and stopping all running app on it prior to removing 'localhost' certificate. Also, you can go to 'control panel > programs' and Repair IIS Express.

这篇关于IISExpress 找不到使用 Visual Studio 2013 运行本地主机的 ssl 页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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