0
votes

I have a web application developed with Asp.Net Core 1.1 deployed on Azure and it works well. I just migrated projects to use Asp.Net Core 2.0 and tried to deploy it on Azure. The deployment went well, but when I open the site, I have a 502.5 error. When I check my Azure log feed, I get the following error:

This error occurs when a CGI application does not return a valid set of HTTP headers, or when a proxy or gateway could not send the request to a parental gateway. You may need to get a network trace or contact the proxy server administrator if this is not a CGI problem.

Needless to say, it works well on my development machine with the same code.

For more information, the way I migrated from 1.1 to 2.0 is to change the settings of the target structure to "netcoreapp2.0" and use the NuGet package "Microsoft.AspNetCore.All".

When I use the web application console in azure and run: dotnet mywebapp.dll, I have the following error:

It was not possible to find a compatible frame version The specified 'Microsoft.NETCore.App' frame, version '2.0.0' was not found. - Check the application's dependencies and target a version of the framework installed at: \ - Alternatively, install the version of the '2.0.0'

Dotnet --version: 2.0.0-preview2-006497

my csproj target the good framework:

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  <PropertyGroup>

I also removed content of site\wwwroot and redeploy, but no change.

What is wrong ?

1

1 Answers

0
votes

In local, I run : Update-Package -reinstall

One package was update in one project.

Then I deploy again and everything is ok