MVC WebApplication的不再IIS防爆preSS启动(重定向到https://本地主机在Chrome浏览器) [英] MVC WebApplication no longer starts in IIS Express (redirects to https://localhost in Chrome)

查看:115
本文介绍了MVC WebApplication的不再IIS防爆preSS启动(重定向到https://本地主机在Chrome浏览器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我改变的OAuth / Owin设置和Azure在一个Web应用程序项目今天上午发布设置,但我们还是决定不久后部署将是一个特定的IIS的Azure虚拟机(现在在我们本地域中可见)。所有code /更改设置都已恢复。

I was changing OAuth/Owin settings and Azure publish settings in a Web Application project this morning, but soon after we decided deployment will be to a specific IIS Azure VM (now visible across our local domain). All code/setting changes have been reverted.

在一个点上我也改变了 drivers \\ etc下\\主机文件,以允许微软的OAuth一个虚拟的名字,但已恢复。

At one point I also changed the drivers\etc\hosts file to allow a dummy name for Microsoft OAuth, but that has been reverted.

注:


  • 我的启动URL是的http://本地主机:22222 /

  • 我在IIS下防爆preSS运行(如我的本地开发的VM不会让我安装完整的IIS)

  • 当我开始与IE浏览器的Web应用程序,我只是得到无法显示此页面

  • 如果我用Chrome的启动它,我得到无法显示此网页提供,但它也改变了浏览器的URL 的https://本地主机(注意取值,即采用SSL)。

  • 我拉下来的项目从源头控制新鲜。没有变化。

  • 该项目是TFS源代码控制之下。

  • 在同一项目其他开发最新的文件,它工作正常。

  • 如果我运行的任何其他Web应用程序项目,他们的工作就好了。

  • 供应商的所有OWIN注册已被注释掉。没有变化。

  • 删除整个项目文件夹,拉着刚从TFS。不用找了。这可能意味着本地机器设置的地方是什么原因?

  • My startup URL is http://localhost:22222/
  • I am running under IIS Express (as my local Dev VM will not allow me to install full IIS)
  • When I start the Web Application with IE I simply get "This page can't be displayed"
  • If I start it with Chrome I get "This webpage is not available", but it also changes the browser URL to https://localhost (note the s, i.e. using SSL).
  • I have pulled the project down fresh from source control. No change.
  • The project is under TFS source control.
  • Another developer on the same project has the latest files and it works fine.
  • If I run any other Web Application project, they work just fine.
  • All OWIN registration of providers has been commented out. No change.
  • Deleted the entire project folder and pulled fresh from TFS. No change. This probably means a local machine setting somewhere is the cause?

什么可能我在Web应用程序损坏,造成这个问题?我一直在抓我的头几个小时,没有我们尝试工作。该应用程序根本就没有在任何浏览器中启动。

What could I have damaged in my Web Application to cause this problem? I have been scratching my head for hours now and nothing we try is working. The application simply will not start in any browser.

项目的Web设置标签:

Project Web Settings tab:

推荐答案

答底部,考虑到这个问题,铬的 [问题444479] 帮助我:

Answer at bottom, given to this chromium issue [issue 444479] helped me:

同样在这里 - 我也相信通过HSTS造成的 - 看
   http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security

Same here - I also believe caused by HSTS - see http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security

如果你(开发),它发送一个HSTS任何其他本地主机网站
  头...

If you have (developed) any other localhost sites which send a HSTS header...

如。严格-运输和安全性:最大年龄= 31536000; includeSubDomains;
  preLOAD

eg. Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

...然后根据max-age的价值,将来的请求
  本地主机将被要求通过HTTPS提供。

...then depending on the value of max-age, future requests to localhost will be required to be served over HTTPS.

要解决这个问题,我做了以下。

To get around this, I did the following.


      
  • 在浏览器地址栏中输入铬://净内部/#HSTS

  •   
  • 在页面的底部在查询域名文本框 - 验证本地主机是众所周知的浏览器

  •   
  • 如果是这样,使用以上文本框中删除本地主机域

  •   
  • 您的网站现在应该使用老式HTTP工作

  •   

HTH,

周杰伦

PS。这是不是一个永久性的解决方案,但至少会得到它的工作
  项目之间。如果有人知道如何排除永久本地主机
  从HSTS列表,请让我知道:)

ps. This is not a permanent solution, but will at least get it working between projects. If anyone knows how to permanently exclude localhost from the HSTS list please let me know :)

试试看。

这篇关于MVC WebApplication的不再IIS防爆preSS启动(重定向到https://本地主机在Chrome浏览器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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