繁体   English   中英

IIS Express HTTP / https绑定无法正常工作

[英]IIS Express http/https bindings not working correctly

我有一个包含6个项目的解决方案。 对于其中两个,我在项目属性中启用了SSL 问题是,当我开始调试时,我的所有项目都以https开头,即使未将其配置为使用SSL。

例如,在启用SSL之前,可以通过http://localhost:63684/访问我的项目。 现在,启用https后,我可以在https://localhost:43000/下访问我的项目,但是当我尝试访问该URL: http://localhost:63684/ ,它将自动更改为https://localhost:63684/并且在浏览器中出现以下错误:

SSL connection error

ERR_SSL_PROTOCOL_ERROR

Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.

对于没有启用SSL的项目,我也无法访问它们。

...\\Documents\\IISExpress\\config\\applicationhost.config文件具有正确的绑定:

<bindings>
    <binding protocol="http" bindingInformation="*:63684:localhost" />
    <binding protocol="https" bindingInformation="*:44300:localhost" />
</bindings>

其他4个项目未启用SSL,但仍会自动切换到https:

<bindings>
    <binding protocol="http" bindingInformation="*:11483:localhost" />
</bindings>

我已经尝试删除IISExpress文件夹,因为我认为config以某种方式被破坏了,但是并没有帮助。

有什么想法会导致自动切换到https,以及如何解决它?

顺便说一句,我下面这个在我的2个项目实现HTTPS时,我的目标是当项目发布到网上本地和https调试时要能使用http的文章。

原来,这是一个Chrome问题,因为我注意到,在其他浏览器上,一切工作正常。 这样的答案帮助我解决了这个问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM