.net-core-2.0 azure app service 502.5 error

自作多情 提交于 2019-11-28 08:12:13

I spoke to the aspnet IISIntegration team members and found my solution.

tldr: Empty out your wwwroot folder on kudu.

The issue relates to having old things leftover from previous 1.x deployments

Step 1:

Navigate to the Kudu Console (https://{yourapp}.scm.azurewebsites.net/)

Step 2:

Step 3:

(Note: navigate into the "site" directory)

(Note: there is a wwwroot folder within this wwwroot. You should delete the one that is in the "site" directory)

Step 4:

Add a new empty folder called wwwroot where you just deleted the previous one (within "site" directory)

(Note: my deployment failed when I didn't have the empty wwwroot folder in there)

Step 5: Redeploy your app and hopefully it works. Good luck

Found the issue. Let me start by adding a little more information. This was originally a .net-core-1.1 project that I updated to 2.0 following instructions provided by Microsoft. After upgrading, I had no issues at all running locally, but once I tried to publish my azure app service, i kept getting the IIS error. Last ditch effort was to create a new .net-core-2.0 project from scratch this morning and noticed that the new project file contained this:

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

I added that to my existing project file (the one upgraded from 1.1) and now the error is gone and issue resolved.

Brand new .net core 2.1 app trying to deploy to new Azure app service with new app service plan. Same issues, namely 502.5 error ( HTTP Error 502.5 - Process Failure ).

I implemented the above steps and still ran into errors. I opted to use the chose the self-contained deployment mode (compared to framework dependent (win-x64)).

This resolved my issue.

This answer was also submitted to [question]: ASP.NET Core 2.0 Preview 2 on IIS error 502.5

Perhaps these questions should be linked.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!