我第一次尝试使用Azure(应用程序服务),并且试图发布我的ASP.NET Core 3.0项目。我已经使用Visual Studio 2019发布到Azure并复制了所有文件,但是在日志文件夹中不断出现错误:
无效的runtimeconfig.json
我已经阅读了一些关于Stackoverflow的问题,但是大多数问题不适用于我的情况。有人可以帮忙吗?
答案 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)
请参考reddit和stack overflow
的帖子,
在门户中的应用程序服务上打开kudu,然后尝试启动 服务。这应该会带来更好的错误。
在2.2首次发布时,我遇到了一个问题 我正在使用的天蓝色区域之一,但2.2应该无处不在 现在