繁体   English   中英

.NET 5 ASP.NET 核心应用程序未在 Azure 中启动

[英].NET 5 ASP.NET Core App not starting in Azure

我正在尝试在 Azure 中托管一个 .NET 5 ASP.NET Core Web Api。不幸的是,该应用程序没有启动,因为“诊断问题”也出现了。 看起来它陷入了一个启动循环,因为我在日志 stream 中一遍又一遍地收到相同的消息:

2020-11-13T11:25:43 Start 'Microsoft.AspNetCore.AzureAppServices.SiteExtension' site extension transform
2020-11-13T11:25:44 StartSection Executing InsertIfMissing (transform line 7, 23)
2020-11-13T11:25:44 on /configuration/system.webServer
2020-11-13T11:25:44 Applying to 'configuration' element (no source line info)
2020-11-13T11:25:44 EndSection Done executing InsertIfMissing
2020-11-13T11:25:44 StartSection Executing InsertIfMissing (transform line 8, 16)
2020-11-13T11:25:44 on /configuration/system.webServer/runtime
2020-11-13T11:25:44 Applying to 'system.webServer' element (no source line info)
2020-11-13T11:25:44 EndSection Done executing InsertIfMissing
2020-11-13T11:25:44 StartSection Executing InsertIfMissing (transform line 9, 31)
2020-11-13T11:25:44 on /configuration/system.webServer/runtime/environmentVariables
2020-11-13T11:25:44 Applying to 'runtime' element (no source line info)
2020-11-13T11:25:44 EndSection Done executing InsertIfMissing
2020-11-13T11:25:44 StartSection Executing InsertOrAppendAttribute (transform line 10, 406)
2020-11-13T11:25:44 on /configuration/system.webServer/runtime/environmentVariables/add[@name='DOTNET_ADDITIONAL_DEPS']
2020-11-13T11:25:44 Applying to 'environmentVariables' element (no source line info)
2020-11-13T11:25:44 EndSection Done executing InsertOrAppendAttribute
2020-11-13T11:25:44 StartSection Executing InsertOrAppendAttribute (transform line 11, 158)
2020-11-13T11:25:44 on /configuration/system.webServer/runtime/environmentVariables/add[@name='DOTNET_SHARED_STORE']
2020-11-13T11:25:44 Applying to 'environmentVariables' element (no source line info)
2020-11-13T11:25:44 EndSection Done executing InsertOrAppendAttribute
2020-11-13T11:25:44 StartSection Executing InsertOrAppendAttribute (transform line 12, 146)
2020-11-13T11:25:44 on /configuration/system.webServer/runtime/environmentVariables/add[@name='ASPNETCORE_HOSTINGSTARTUPASSEMBLIES']
2020-11-13T11:25:44 Applying to 'environmentVariables' element (no source line info)
2020-11-13T11:25:44 EndSection Done executing InsertOrAppendAttribute
2020-11-13T11:25:44 Successful 'C:\home\SiteExtensions\Microsoft.AspNetCore.AzureAppServices.SiteExtension\applicationHost.xdt' site extension transform
2020-11-13T11:25:44 sandboxproc.exe complete successfully. Elapsed = 1208.00 ms
2020-11-13T11:25:56 sandboxproc.exe D:\DWASFiles\Sites\fotoapp-api\Temp\applicationhost.config True True
2020-11-13T11:25:57 env XPROC_TYPENAME=Microsoft.Web.Hosting.Transformers.ApplicationHost.SiteExtensionHelper, Microsoft.Web.Hosting, Version=7.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
2020-11-13T11:25:57 env XPROC_METHODNAME=Transform
<these messages repeat endlessly>

我尝试了依赖于框架的部署(在应用程序服务中启用了 .NET 5 运行时)和独立部署。

我在任何地方都找不到更好的日志。 尚不支持 Application Insights。

对 api 的请求未通过日志 stream。大约 2 分钟后,服务器响应“HTTP 错误 503。服务不可用”。

我也有这个错误。

就我而言,问题与Azure App Service 64 位/32 位平台设置( Web App \ Configuration \ General settings \ Platform settings )有某种关系。

我最近将其更改为 64 位,然后开始出现此错误,当我恢复为 32 位时,问题就消失了。

我还没有确定根本原因,但就其价值而言,它就在那里。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM