Failed to Start Process with Commandline VSIISExeLauncher.exe in IIS 10.0
Asked Answered
A

7

6

Thursday night, I was working on a project built in ASP.NET Core 2.1 (being prepared for ASP.NET Core 2.2) running on my local IIS 10.0 (not IIS Express) and was able to run it without any issue. Friday morning, after heading into the office, I was met with the following error every time I try to run my solution in Visual Studio:

  • Unable to start process C:\Program Files (x86)\dotnet\dotnet.exe. The web server request failed with status code 502, Bad Gateway. The full response has been written to [file_name].html.

When I open the [file_name].html, I'm given the response:

  • HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure

When I open the Event Viewer, I'm given the response:

  • Application 'MACHINE/WEBROOT/APPHOST/DEFAULT WEB SITE/[Path]' with physical root '[Path]' failed to start process with commandline '[Path]\bin\IISSupport\VSIISExeLauncher.exe -argFile IISExeLauncherArgs.txt', ErrorCode = '0x800700c1' : 0.

I have:

  • Turned off and on the IIS through Windows Features, making sure the correct Internet Information Services features were checked
  • Created an Application Pool where [.NET CLR version] is set to "No Managed Code" and [Managed pipeline mode] is set to "Integrated"
  • Uninstalled and Reinstalled: IIS Url Rewrite to IIS
  • Uninstalled and Reinstalled: Microsoft .NET Core SDK - 2.1.504 (x64)
  • Uninstalled and Reinstalled: Microsoft .NET Core SDK - 2.1.504 (x84)
  • Uninstalled and Reinstalled: Microsoft .NET Core SDK - 2.2.104 (x64)
  • Uninstalled and Reinstalled: Microsoft .NET Core SDK - 2.2.104 (x84)
  • Uninstalled and Reinstalled: Microsoft .NET Core Runtime - 2.1.8 (x64)
  • Uninstalled and Reinstalled: Microsoft .NET Core Runtime - 2.1.8 (x86)
  • Uninstalled and Reinstalled: Microsoft .NET Core Runtime - 2.2.2 (x64)
  • Uninstalled and Reinstalled: Microsoft .NET Core Runtime - 2.2.2 (x86)
  • Uninstalled and Reinstalled: Microsoft .NET Core 2.1.8 - Windows Server Hosting
  • Uninstalled and Reinstalled: Microsoft .NET Core 2.2.2 - Windows Server Hosting
  • Restarted my computer after ever re-installation

What else can I try because none of my other projects are working either.

Analogy answered 2/3, 2019 at 16:49 Comment(3)
Same issue for me and followed the same steps you've followed to some degree. I'll let you know if I figure it out!Flow
Figured mine out - it was that I'd managed to delete host.Run() from my startup :( - noticed the stdout log was blank which means the host can't have been running something that did anything...Flow
Any solution for this issue ?Falsetto
A
1

I found the solution.

In the root folder of my team's project, there was an empty "file" file titled "The". For the sake of things, our project is called "The Project" with a space between the words. I removed this file and everything built fine.

My guess is that getting the latest files from our Teams server must have generated a half-formed file and messed with the build of my project.

Analogy answered 11/4, 2019 at 16:55 Comment(0)
H
2

In my case this issue occurred when I manually cleared the bin folder (which deleted the necessary files in the IISSupport folder) and tried to load the application which was set up as an application under my localhost in IIS.

To solve all I needed to do was to run the application through Visual Studio, which added the necessary IISSupport folder and files to the bin.

Hockey answered 21/2, 2020 at 21:32 Comment(0)
F
1

I got this fixed by re-installing the Visual studio. Still I'm not sure if this is the best way to fix this.

I've also tried all the approaches mentioned in this question but nothing fixed the issue.

Falsetto answered 22/3, 2019 at 14:23 Comment(0)
A
1

I found the solution.

In the root folder of my team's project, there was an empty "file" file titled "The". For the sake of things, our project is called "The Project" with a space between the words. I removed this file and everything built fine.

My guess is that getting the latest files from our Teams server must have generated a half-formed file and messed with the build of my project.

Analogy answered 11/4, 2019 at 16:55 Comment(0)
D
1

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.

Dikmen answered 8/5, 2021 at 11:36 Comment(0)
G
0

In my case, the issue is in launchSettings.json.

First, make sure which profile you are running while click run button. my case is 'IIS Express',

Then open the file, go to =>Profiles, make sure the command name in IIS Express profile. my case is IIS. more details about command name.

And check iisSettings in above section. my case is using IIS as command, so I check iis => applictionUrl and sslPort. the issue is here, the application url is using a different domain name. which is different from the launch URL. once i republish the website on my local dev box using the launch url domain, it works fine. BTW, we use host file to fake those domain names.

if you have other team members working on the same project, make sure you all use same settings of the dev web site. or developers can just edit it locally, do not check in the settings if it could not work on other developer's machine.

Grewitz answered 18/10, 2019 at 13:10 Comment(0)
C
0

in my case i solved the error deleting the .vs folder on the project root and i restarted visual studio.

Cartie answered 9/10, 2022 at 14:54 Comment(0)
C
0

I had an issue with failed to start process with commandline on the remote IIS. I had to add the web.config to the project and ensure it would be published. The default file looks like below:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- To customize the asp.net core module uncomment and edit the following section. For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->
    <system.webServer>
       <handlers>
          <remove name="aspNetCore" />
          <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
       </handlers>
       <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
    </system.webServer>
</configuration>

I replaced %LAUNCHER_PATH% with dotnet and %LAUNCHER_ARGS% with .\MyProjectNameHere.dll like

<aspNetCore processPath="dotnet" arguments=".\Web.Api.V3.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
Certifiable answered 25/10, 2022 at 21:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.