Asp.Net Core 2.0 on Azure results in a 502.5 Asp.Net Core 2.0 on Azure results in a 502.5 azure azure

Asp.Net Core 2.0 on Azure results in a 502.5


the issue was actually coming from the fact that, at first, my web app was using .net core 1.1, which deploys all the DLL in the "wwwroot" folder of the web application. However, with asp.net core 2.0, it does not do that anymore as the DLL are picked up from a global store. However, as Visual Studio does not clean the destination folder before a publish, I ended up with a situation where the 1.1 DLL were in my wwwroot, so the web site was picking up these ones instead of the 2.0 ones in the store folder.

This is explained in more details here: https://github.com/Azure/app-service-announcements-discussions/issues/2#issuecomment-313816550


Others have explained the reason why this is happening. I'd like to provide another – arguably easier – solution to the problem.

Just change the settings so that you remove files that are already on Azure – see below:

publish project settings

publish project settings option


Check for log files either in the portal or by remotely accessing D:\home\LogFiles.

Sometimes, the logs won't indicate what is going wrong. Another good way to investigate further is to try launching your ASP.NET Core app from the Debug Console. If you are missing a shared framework version or there is another startup error, this will be more visible from the Debug Console.

Go to

https://(your web site name here).scm.azurewebsites.net/DebugConsole/

Your site will be in D:\home\site\wwwroot. You can launch it by executing:

cd D:\home\site\wwwrootdotnet MyWebApp.dll

If you app still fails to launch, make sure that D:\home\site\wwwroot\web.config is available and configured to use ASP.NET Core Module. https://docs.microsoft.com/en-us/aspnet/core/hosting/aspnet-core-module