【发布时间】:2017-04-27 07:12:17
【问题描述】:
我在使用 azure 上部署的 asp .net 核心应用时遇到问题。
Azure 返回此结果:
我的问题是:我该如何调试?为什么会这样?/为什么会这样?这是一个 Asp .Net Core 问题吗?托管问题?
我正在使用 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();
谢谢:)
【问题讨论】:
-
查看相关问题asp.net core app deployed on iis meets 500 internal server error。您可以从启用
stdouLog -
你发现了吗?我也有同样的问题。
-
首先,尝试输入 azure (kudu) 并删除 wwwroot 文件夹,或者确保在使用 VS Studio 部署时先清理文件夹(删除文件),我的问题是我改变了我的框架并且不清理旧的发布文件
标签: c# azure asp.net-core asp.net-core-mvc asp.net-core-1.1