admin管理员组文章数量:1400375
Under Settings > Configuration for an Azure Web App Service, if the .NET Version is changed (followed by "Save") to either .NET 9 (STS), or to .NET 8 (LTS), and then Publish (having referenced the appropriate net9.0 or net8.0 target frameworks in the solution), the App Service fails to start up properly.
The following error page is displayed:
HTTP Error 500.30 - ASP.NET Core app failed to start
Meanwhile, Azure reverts the configuration for the App Service back to .NET 6 (LTS) (deprecated).
Under Settings > Configuration for an Azure Web App Service, if the .NET Version is changed (followed by "Save") to either .NET 9 (STS), or to .NET 8 (LTS), and then Publish (having referenced the appropriate net9.0 or net8.0 target frameworks in the solution), the App Service fails to start up properly.
The following error page is displayed:
HTTP Error 500.30 - ASP.NET Core app failed to start
Meanwhile, Azure reverts the configuration for the App Service back to .NET 6 (LTS) (deprecated).
Share Improve this question edited Mar 24 at 6:59 marc_s 756k184 gold badges1.4k silver badges1.5k bronze badges asked Mar 24 at 6:51 CNHumeCNHume 932 silver badges12 bronze badges 6- Are you trying to upgrade your app to .NET Core 8 or 9 from .NET Core 6? – Aslesha Kantamsetti Commented Mar 24 at 6:57
- Please Share the Logs from the Log Stream. – Aslesha Kantamsetti Commented Mar 24 at 6:58
- I upgraded my projects to net8.0 on December 12th, 2023 which worked even when using framework-dependent deployment. I upgraded to net9.0 when it was released on November 14th 2024. In the latter case, I have been forced to use the self-contained rather than framework-dependent deployment. Until very recently, this was publishing and starting up properly. – CNHume Commented Mar 24 at 15:46
- Is your issue resolved? – Aslesha Kantamsetti Commented Mar 25 at 4:38
- No, the issue is not resolved. Furthermore, the Application Event Viewer Tool Failed. – CNHume Commented Mar 25 at 10:09
1 Answer
Reset to default 0HTTP Error 500.30 - ASP. NET Core app failed to start
The above error usually occurs due to issues with application code or dependencies, missing .NET Runtime version.
For you It may be due to dependencies because you're changing core versions from core 6 to core 8 to core9.
When a configured runtime fails to start, it tries to revert to .NET 6 (LTS, deprecated) rather than .NET 8, which could be due to cached settings or older infrastructure.
When you upgrade app to higher versions make sure to delete obj
and bin
folders and update the NuGet Packages
.
Example .csproj file:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="9.0.0" />
</ItemGroup>
</Project>
Clear the NuGet Storage by selecting Tools -> NuGet Package Manager -> Package Manager Settings -> NuGet Package Manager -> General -> Clear All NuGet Storage -> OK.
Before deploying your app to Azure, delete the wwwroot
folder using the Kudu Console. This may help clear the previous deployment.
If still facing the issue check Azure logs for detailed errors using below command Or Create new Azure Web app.
az webapp log tail --name <AppServiceName> --resource-group <ResourceGroupName>
Azure Output:
本文标签:
版权声明:本文标题:asp.net core - Why does Azure reset the Configuration for my App Service to .NET 6 (LTS) (deprecated)? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744257181a2597537.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论