| Home » Categories » Multiple Categories |
HTTP Error 502.5 - Process Failure error message when publishing an ASP.NET Core Website |
|
Article Number: 313 | Rating: 5/5 from 4 votes | Last Updated: Wed, Sep 24, 2025 at 12:07 AM
|
| On some occassions, when you try to deploy an ASP.NET Core website to our server, you can see the following error message: 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
To resolve this issue, you need to publish the website/project as a self-contained application. In order to publish it as a self-contained application, please add this to the csproj folder.
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RuntimeIdentifiers>win7-x64;win7-x86;ubuntu.16.04-x64;</RuntimeIdentifiers>
<SuppressDockerTargets>True</SuppressDockerTargets>
</PropertyGroup>
The details of the steps are as followed: Step 1: Download VS 2017 from Microsoft website
Step 2: Open solution within vs 2017, you will be told once this happens, you can no longer open the project within vs 2015, however they do backup automatically a version at 2015
step 3: The xproj file at the heart of the application is transformed into a csproj file. This filetype is *now* editable by right clicking on the Main project heart within the directory, and selecting edit {!ProjectName}.csproj, it should open an XML file format.
step 4. Add these lines to the project. (Please note, the project may contain some of these lines already).Some has to add the runtimeidentifiers and supperdocker targets to a property group that already existed.
step 5. Open the project within the command prompt in the usual method (where you right click the project name, open file explorer at the project location and then crtl+shift clicking within the file explorer and selecting the open with command prompt option.
Step 6. Run: dotnet publish -c Release -r win7-x64 within the command prompt
NOTE: Please run the following command: npm install -g bower - within the nugget package manager console, this is meant to install bower globally or something along those lines. This process will publish a self-contained application of your project within the root directory>Bin>Release>Win64>publish
The command prompt should inform you of the location
That is how the latest and most prevalent 502.5 error that occurs with the 2015 --> 2017 upgrade is rectified.
Please do not forget to add the following lines:
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RuntimeIdentifiers>win7-x64;win7-x86;ubuntu.16.04-x64;</RuntimeIdentifiers>
<SuppressDockerTargets>True</SuppressDockerTargets>
</PropertyGroup>
|
Attachments
There are no attachments for this article.
|
How to solve ReportViewer error message: "An error has occurred during report processing. Input string was not in a correct format"
Viewed 8735 times since Tue, Jun 18, 2013
I receive this error message: "Directory Listing Denied. This Virtual Directory does not allow contents to be listed."
Viewed 11228 times since Mon, Apr 30, 2012
How do I query MySQL Database in PHP ?
Viewed 3877 times since Tue, May 1, 2012
How To Solve Problem with Connection String on EF (Entity Framework) 4 or above
Viewed 32916 times since Mon, Apr 1, 2013
Do you support ASP.NET MVC 6?
Viewed 5379 times since Wed, Feb 17, 2016
How to Deploy and host .Net Core 2 and Angular 6 app
Viewed 13995 times since Tue, Oct 23, 2018
How to solve the Let’s Encrypt SSL on ASP.NET Core
Viewed 10268 times since Mon, Jul 17, 2017
I cannot see my website. What should I do?
Viewed 4305 times since Thu, May 3, 2012
How can I enable ASP.NET 3.5 on your Control Panel?
Viewed 4346 times since Wed, May 2, 2012
Issue with Storing Session
Viewed 4295 times since Tue, Mar 24, 2015
|
