ASP.Net Core 2 - IIS 502.5 Error


I am creating an ASP .Net Core (2.0) MVC application within Visual Studio 2017 which was working absolutely fine.

After turning off my computer yesterday and coming back to my application today, I now receive this browser error when I start the application in chrome without debugging.

Running dotnet run within the directory of the application, I can access the site just fine. It is just when I run it via Visual Studio/IIS Express I get this error.

HTTP Error 502.5 - Process Failure

The application builds and compiles just fine. I have also cleaned the solution.

Looking in the event logs I find:

  • Application 'MACHINE/WEBROOT/APPHOST/MYAPP' with physical root 'C:\Users\Ben Hawkins\Desktop\Development Folder \Dev\Website\Version_2\MYAPP\MYAPP\' failed to start process with commandline 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectSystem\VSIISExeLauncher.exe -argFile "C:\Users\Ben Hawkins\AppData\Local\Temp\tmp3547.tmp"', ErrorCode = '0x80004005 : 0.

Within my output window in Visual Studio 2017 I recieve this message under ASP NET CORE WebServer

Failed to initialize CoreCLR, HRESULT: 0x80131534

What I have tried:

  1. Cleaning the solution, rebuilding etc
  2. Restarting the computer
  3. Trying to launch another application. (Same result)
  4. Created a new application from scratch. Same result.
  5. Repairing Visual Studio Community 2017. Same result.
  6. Stopping/Closing IIS Express

My setup was working perfectly yesterday and suddenly is not.

Thank you for your time. I hope we can find a solution.
asked on Stack Overflow Jan 1, 2018 by B.Hawkins • edited Jan 2, 2018 by B.Hawkins

7 Answers


We finally found the issue! After logging on to the machine as a different user, we saw a warning that the main user had ignored initially. There was a 0 byte file in the root of the directory named "Program" with no file extension. It appears that this causes some sort of issue when VSIISExeLauncher.exe is invoked through Visual Studio. (Note it would work if executed from the command prompt). After deleting the file, everything worked!

We do not know how this file was placed there for certain, but suspect it was some sort of copy error when the user was pulling in files from his old hard drive.

I don't know if anyone else will come across this, but if so hopefully this helps!

answered on Stack Overflow Mar 14, 2018 by palehorse

Maybe you need install previous versions of .NET Core, isn't it? I installed here and it works now. I had only .NET Core 2.0 installed and I realized that applications with 1.1 stopped so when running. In Windows' event logs I've had the same error registered.

answered on Stack Overflow Mar 14, 2018 by Paulo Fernando

I have hit a very similar issue with Core 2.0. I had copied my VS project to a new one, and I was getting this error message.

After doing some research, I was able to determine that the nlog.config file was not copied into the bin > Debug > net461 folder. Once I did this, I was able to run my application.

I found it by running dotnet run from the command line on my project where the csproj files live.

answered on Stack Overflow Jul 4, 2018 by Jason Coe • edited Jul 4, 2018 by Stephen Rauch

Try to change the IISExpress to IIS by creating new IIS profile and change the Lunch to IIS. It resolved my problem. enter image description here

answered on Stack Overflow Aug 26, 2018 by joepadz

Had same issue yesterday (windows 10). Solved it this way:

  1. Update Microsoft.AspNetCore to latest (Nuget manager - 2.1.3)
  2. Make sure the sdk also updated to latest version. if not, update it manually from Nuget console like this: Install-Package Microsoft.NETCore.App -Version 2.1.3
  3. Download and install latest ASP.NET Core/.NET Core: Runtime & Hosting Bundle from here
answered on Stack Overflow Sep 4, 2018 by user10290365

Same problem with version 2.2. Reinstalling .NET Core SDK fixed the problem for us.

answered on Stack Overflow Jun 28, 2019 by Dim_Ka

In my case, my project was setup as a website in IIS and the file "bin\IISSupport\VSIISExeLauncher.exe" was missing in the project's directory.

I simply selected "IIS" when debugging the project in Visual Studio 2019 and it generated the missing file. It also generated 2 text files (IISExeLauncherArgs.txt, pidfile.txt) in the IISSupport folder, made changes to my web.config file, and my project ran successfully.

After that I was able to access the local website that was setup in IIS without running it in Visual Studio.

answered on Stack Overflow May 8, 2021 by thegreatgiver

User contributions licensed under CC BY-SA 3.0