Azure webapp 502.5 error, appeared out of nowhere

1

I'm hosting a website on Azure, and it's been working fine for the past few months. I'm using a devops build/release pipeline for CI, which works great as well.

This morning, my website went down with a 502.5 error - Process Failure without any recent changes or commits to the solution.

I've tried restarting it, I've tried debugging it through Azure.

I ended up trying to use dotnet .[app name here] in the console in Azure, which gave the following error:

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Server.IISIntegration, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at Microsoft.AspNetCore.WebHost.CreateDefaultBuilder(String[] args) at InventoryManagementGalten.Program.CreateWebHostBuilder(String[] args) in D:\a\1\s\InventoryManagementGalten\Program.cs:line 14 at InventoryManagementGalten.Program.Main(String[] args) in D:\a\1\s\InventoryManagementGalten\Program.cs:line 10

which sounds like a version mismatch - although I'm not sure where or how to fix it.

Any ideas are much appreciated!

Update: When I go into application logs, this is the first error that randomly appeared in the middle of the night:

Application: dotnet.exe CoreCLR Version: 4.6.27129.4 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Server.IISIntegration, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at Microsoft.AspNetCore.WebHost.CreateDefaultBuilder(String[] args) at InventoryManagementGalten.Program.CreateWebHostBuilder(String[] args) in D:\a\1\s\InventoryManagementGalten\Program.cs:line 14 at InventoryManagementGalten.Program.Main(String[] args) in D:\a\1\s\InventoryManagementGalten\Program.cs:line 10

Edit:

Solved, read comment below.

c#
asp.net-mvc
azure
asp.net-core
asked on Stack Overflow Jan 11, 2019 by Fross • edited Jan 11, 2019 by Fross

1 Answer

3

The nuget package Microsoft.AspNetCore.Server.IISIntegration was listed with Version 2.1.7, but I was using 2.2 in my project.

I changed the project to use 2.1.7 for now, but I'll have to look into how I upgrade it in the future.

answered on Stack Overflow Jan 11, 2019 by Fross

User contributions licensed under CC BY-SA 3.0