HTTP Error 502.5 - Process Failure asp.net core 2.

2020-03-26 02:34发布

Problem

I already developed my web app and published it to azure with asp.net core 1.1 and it was working fine until I upgraded my web application to Core 2.0 final release and now the app working locally but when I deploy it to Azure It gives me this issue .

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
  </ItemGroup>

I just update .csproj file with this line of code

HTTP Error 502.5 - Process Failure

Common causes of this issue:

The application process failed to start The application process started but then stopped The application process started but failed to listen on the configured port

Troubleshooting steps:

Check the system event log for error messages Enable logging the application process' stdout messages Attach a debugger to the application process and inspect

5条回答
神经病院院长
2楼-- · 2020-03-26 03:03

After upgraded to ASP.NET Core 2.0, you need to add following configuration section to all the .csproj files in the solution.

<ItemGroup>
   <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>

You could create a new ASP.NET Core 2.0 application to check it. The DotNetCliToolReference configuration section is already in the new ASP.NET Core 2.0 application project file but missed in your upgraded application project file.

查看更多
Fickle 薄情
3楼-- · 2020-03-26 03:14

I had the issue HTTP Error 502.5 - Process Failure, mine was fix by installing the .net sdk

https://www.microsoft.com/net/download/visual-studio-sdks

查看更多
倾城 Initia
4楼-- · 2020-03-26 03:16

With a bit of searching this worked for me.

Essentially clean out the wwwroot folder from a console on your Azure Portal. Make sure you get the top most wwwroot folder (I had a sub wwwroot folder for some reason.)

RD wwwroot /S /D

Should do the trick. Then just republish your site. It would appear that the publish process does NOT delete anything that already exists within the deploy folder. So you have 1.1 .dlls and 2.0 .dlls.

Hope that does the trick for you.

查看更多
在下西门庆
5楼-- · 2020-03-26 03:20

I was running 2.0.8, had to downgrade to 2.0.5 then it worked. The 2.0.8 didn't include a the Self-contained deployments (SCD) as supposed which 2.0.5 did.

I'm using VSTS to build and release

查看更多
何必那么认真
6楼-- · 2020-03-26 03:25

I had same problem publishing a simple spike app using VS2017 15.7.1 - File | New Project, ASP.NET Core Web App, MVC, ASP.NET Core 2.0 - Build and run on local host - Publish to Azure WebApp

Browser displayed error: HTTP Error 502.5 - Process Failure

enter image description here

查看更多
登录 后发表回答