HTTP Error 502.5 - Process Failure api using azure


I got a ASP.Net application that runs fine locally. when i deploy from VS 2017 to azure its deploys fine but when i get to the address the error:

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.

This problem arrived once i added this in web.config:

  <compilation debug="true" targetFramework="4.5">
  <add assembly="System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

to fix another problem. It didnt help but i accidently left this in my code. i deployed once to azure having this piece of code in my web.config. then this problem arrived. and even when i removed this piece of code the error still keeps appearing. it has run fine for serveral days.

when i check my file logs it says:

>Application 'MACHINE/WEBROOT/APPHOST/LIBRARYRESTAPI' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline '"dotnet" .\Library.API.dll', ErrorCode = '0x80004005 : e0434352.

the rest of my web.config looks like this:

<?xml version="1.0" encoding="utf-8"?>

      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>

my startup.cs looks like this:

public class Program
    public static void Main(string[] args)
        var host = new WebHostBuilder()


the PROJECT.csproj looks like this:

<Project Sdk="Microsoft.NET.Sdk.Web">


  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

    <PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.0.2" />
    <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.2" />
    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.0.3" />
    <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.2" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.3" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.0.3" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.0.2" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.0.3" />
    <PackageReference Include="System.Net.Http" Version="4.3.2" />

    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" />

    <Reference Include="System.Web">
      <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Web.dll</HintPath>
    <Reference Include="System.Web.Extensions">
      <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Web.Extensions.dll</HintPath>

asked on Stack Overflow May 12, 2017 by louisschrauwen • edited May 12, 2017 by louisschrauwen

3 Answers


I just encountered a similar issue.

I updated my .csproj to target 1.1.1 and that fixed the issue when uploading to Azure.


I'm not sure what happened to cause this issue. I have completed several uploads to Azure this week. There was an update to VS 2017 yesterday which might be the cause.

answered on Stack Overflow May 12, 2017 by Eilimint

My solution was that i recreated my api in an new project.

I just copied the code and it started working again.

answered on Stack Overflow May 16, 2017 by louisschrauwen

I was running multiple applications in different virtual directories but inside a single azure app service. The application I added had different versions of dependencies inside than the existing one which caused this error. I made my dependencies to match and now they're both working.

answered on Stack Overflow Nov 22, 2019 by sirdank

User contributions licensed under CC BY-SA 3.0