问题描述
你好
我正在Visual Studio Community 2017版本15.8.5上运行Core 2.1.5,并发布到App Service共享计划.
I am running Core 2.1.5 on Visual Studio Community 2017 Version 15.8.5 and publishing to an App Service shared plan.
默认情况下,Visual Studio创建一个需要https证书的应用程序,即使在创建和发布新应用程序时取消选中https复选框也是如此.每当我发布到我的网站时,现在都会出现证书错误,因为该网站正在运行 到https地址而不是http.
By default, Visual Studio creates an app that requires a https certificate, even when I uncheck the checkbox for https when a new app is created and published. Whenever I publish to my site, there is now a certificate error because the site is going to a https address instead of http.
是什么原因造成的?如何配置应用程序,以便将其发布到http?
What is causing this and how do I configure the app so that it publishes to http?
我注意到在startup.cs文件中,有一个对app.UseHttpsRedirection()方法的引用.即使当我从文件中删除此方法时,该站点仍将发布到https站点.我在做什么错了?
I noticed that in the startup.cs file, there is a reference to the app.UseHttpsRedirection() method. Even when I delete this method from the file, the site will still publish to a https site. What am I doing wrong please?
我们非常感谢您的协助.
Any assistance is greatly appreciated.
布莱恩
推荐答案
我认为这是因为当您尝试创建Web应用程序时,您配置了 Https
I think this is because when you tried to create a Web Application, you configured theHttps
这篇关于应用服务共享计划-证书错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!