无效的runtimeconfig.json Azure应用服务需要怎么办

时间:2020-06-29 15:20:05

标签: azure asp.net-core

我第一次尝试使用Azure(应用程序服务),并且试图发布我的ASP.NET Core 3.0项目。我已经使用Visual Studio 2019发布到Azure并复制了所有文件,但是在日志文件夹中不断出现错误:

无效的runtimeconfig.json

我已经阅读了一些关于Stackoverflow的问题,但是大多数问题不适用于我的情况。有人可以帮忙吗?

2 个答案:

答案 0 :(得分:1)

就我而言,我在 web.config 中对 aspNetCore 进行了以下更改:

<块引用>

stdoutLogFile="\?%home%\LogFiles\stdout"stdoutLogFile=".\LogFiles\stdout"

这就是显示问题的原因。但请保持 stdoutLogFile="\?%home%\LogFiles\stdout 原样。

这里是完整的 web.config

<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\SmartApp.Inventory.Api.dll" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>

答案 1 :(得分:0)

请参考redditstack overflow的帖子,

在门户中的应用程序服务上打开kudu,然后尝试启动 服务。这应该会带来更好的错误。

在2.2首次发布时,我遇到了一个问题 我正在使用的天蓝色区域之一,但2.2应该无处不在 现在