Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure App Service doesn't run after upgrading to DotNet Core 2.2

After the release of DotNet Core 2.2 I upgraded my Solution to the new version but when I deploy it to my Azure App Service, it no longer runs. It simply gives the following error: The page cannot be displayed because an internal server error has occurred.

My .csproj file looks like this in case you'd need it:

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
    <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.0.2105168" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\DAL\DAL.csproj" />
    <ProjectReference Include="..\Model\Models.csproj" />
  </ItemGroup>

  <ItemGroup>
    <WCFMetadata Include="Connected Services" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="wwwroot\userPictures\" />
  </ItemGroup>

</Project>
like image 210
Job Avatar asked Dec 04 '18 20:12

Job


People also ask

Is .NET Core 2.2 supported?

Out of support OS versions Support for the following versions was ended by the distribution owners and are no longer supported by . NET Core 2.2.

How do I troubleshoot Azure App Service?

To access App Service diagnostics, navigate to your App Service web app or App Service Environment in the Azure portal. In the left navigation, click on Diagnose and solve problems.

How do I upgrade my Azure App Service?

In the Azure portal, search for and select App services and select the app that you want to move. From the left menu, select Change App Service plan. In the App Service plan dropdown, select an existing plan to move the app to.


2 Answers

It seems that asp.net core 2.2 updates have not fully rolled out to all regions for Azure App Services. See: https://blogs.msdn.microsoft.com/webdev/2018/12/04/asp-net-core-2-2-available-today/

They say it will be rolled out over the coming weeks and finished by the end of December.

It seems there is some sort of workaround, although I don't know the specifics: https://github.com/dotnet/core/blob/master/release-notes/2.2/2.2-known-issues.md

like image 106
Dan Avatar answered Nov 04 '22 22:11

Dan


I noticed that nuget updated web.config by changing AspNetCoreHosting to AspNetCoreHostingV2. I reverted to AspNetCoreHosting and the app came straight back online. Looks like this will be fixed by end of the year according to links in answer from @Dan.

for the record I'm using net472 not netcoreapp2.2

like image 37
Tom Makin Avatar answered Nov 04 '22 22:11

Tom Makin