Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.Net Core 2 - IIS 502.5 Error

Tags:

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.

like image 936
B.Hawkins Avatar asked Jan 01 '18 19:01

B.Hawkins


2 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!

like image 72
palehorse Avatar answered Sep 19 '22 12:09

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.

like image 35
Paulo Fernando Avatar answered Sep 20 '22 12:09

Paulo Fernando