1
我在部署在Azure上的asp.net核心应用程序出现问题。Azure上的Asp .NET Core获得502 Web服务器在充当网关或代理服务器时收到无效响应
天青返回此结果:
我的问题是:我如何调试呢?这是为什么?/为什么会发生?这是一个Asp .Net核心问题?托管问题?
我使用的web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
</configuration>
,这是用我的Program.cs .UseIISIntegration()
和.UseUrls("http://*:5000")
var host = new WebHostBuilder()
.UseKestrel()
.UseIISIntegration()
.UseUrls("http://*:5000")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseApplicationInsights()
.UseStartup<Startup>()
.Build();
host.Run();
谢谢:)
检查相关的问题[在IIS上部署asp.net核心应用达到500内部服务器错误](http://stackoverflow.com未来/一个/2833802分之39786318)。您可以从启用“stdouLog”开始 – Set
您发现了吗?我也有同样的问题。 – snekkke
首先,尝试输入azure(kudu)并删除wwwroot文件夹,或者确保在使用VS Studio进行部署时首先清理文件夹(删除文件),我的问题是我更改了框架并且未清理旧的发布文件 –