MVC WebApplication no longer starts in IIS Express (redirects to https://localhost in Chrome)

后端 未结 1 958
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-01 00:43

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

相关标签:
1条回答
  • 2021-01-01 01:15

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

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

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

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

    ...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.

    • In the Chrome address bar type "chrome://net-internals/#hsts"
    • At the very bottom of a page is QUERY domain textbox - verify that localhost is known to the browser
    • If it is, DELETE the localhost domain using the textbox above
    • Your site should now work using plain old HTTP

    HTH,

    Jay

    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 :)

    Give it a try.

    0 讨论(0)
提交回复
热议问题