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

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

问题描述

当我以 http://localhost:26049 访问该站点时,该站点运行良好.如果我尝试使用 https://localhost:44319 访问该站点,则会显示找不到页面.

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.

这是我的项目属性:

这来自我的IISExpress应用程序配置:

This is from my IISExpress application config:

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

推荐答案

这篇文章中的解决方案.必须删除所有本地主机证书并修复IIS Express.谢谢@ShaTin

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

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

确保删除所有以前的"localhost"证书,因为这些证书可能与IIS Express生成的证书冲突.我遇到了同样的错误(ERR_SSL_PROTOCOL_ERROR),在尝试了许多解决方案"之后,花了我很多时间才终于弄清.我的错误是我创建了自己的本地主机"证书,其中有两个.我必须删除两者,然后让IIS Express重新创建它.

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.

以下是检查和删除"localhost"证书的方法:

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

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

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.

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

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运行localhost的SSL页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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