failed to start process with commandline

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
failed to start process with commandline '%LAUNCHER_PATH% %LAUNCHER_ARGS%', ErrorCode = '0x80070002 : 0.
Getting this problem again with NC 4.2 (last time it was 4.1 and 4.0).

Running IIS 8.0 on Windows Server 2012.
Installed DotNetCore 2.2 runtime. - no joy
Installed DotNetCore 2.2 SDK (runtime did not fix the problem) - no joy

The application runs fine in VS2017, so it's a configuration problem somewhere, but, since I can't find this error on Google, I'm not sure where to look or what a proper web.config file should look like for this.  I've rebooted the server between installs, double checked every file, and am at wit's end.

My web.config on the server:


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <modules>
      <!-- Remove WebDAV module so that we can make DELETE requests -->
      <remove name="WebDAVModule" />
    </modules>
    <handlers>
      <!-- Remove WebDAV module so that we can make DELETE requests -->
      <remove name="WebDAV" />
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <!-- When deploying on Azure, make sure that "dotnet" is installed and the path to it is registered in the PATH environment variable or specify the full path to it -->
    <aspNetCore requestTimeout="23:00:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" startupTimeLimit="3600">
      <environmentVariables />
    </aspNetCore>
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By" />
        <!-- Protects against XSS injections. ref.: https://www.veracode.com/blog/2014/03/guidelines-for-setting-security-headers/ -->
        <add name="X-XSS-Protection" value="1; mode=block" />
        <!-- Protects against Clickjacking attacks. ref.: http://stackoverflow.com/a/22105445/1233379 -->
        <add name="X-Frame-Options" value="SAMEORIGIN" />
        <!-- Protects against MIME-type confusion attack. ref.: https://www.veracode.com/blog/2014/03/guidelines-for-setting-security-headers/ -->
        <add name="X-Content-Type-Options" value="nosniff" />
        <!-- Protects against Clickjacking attacks. ref.: https://www.owasp.org/index.php/HTTP_Strict_Transport_Security_Cheat_Sheet -->
        <add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains" />
        <!-- CSP modern XSS directive-based defence, used since 2014. ref.: http://content-security-policy.com/ -->
        <add name="Content-Security-Policy" value="default-src 'self'; connect-src *; font-src *; frame-src *; img-src * data:; media-src *; object-src *; script-src * 'unsafe-inline' 'unsafe-eval'; style-src * 'unsafe-inline';" />
        <!-- Prevents from leaking referrer data over insecure connections. ref.: https://scotthelme.co.uk/a-new-security-header-referrer-policy/ -->
        <add name="Referrer-Policy" value="strict-origin" />
        <!--Feature-Policy is a new header that allows a site to control which features and APIs can be used in the browser. ref.: https://wicg.github.io/feature-policy/ -->
        <add name="Feature-Policy" value="accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment *; usb 'none'" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>
4 years ago
Did you reboot server after install .NetCode code ?

Did you set the Application pool .NET CLR Version for the website to have "No managed code"

Have you set the directory permissions to allow access
i.e. add for your Application pool

User: IIS AppPool\Application pool
Allow Modify for Write Permisions

Try setting stdoutLogEnabled="true" and see what goes in the log file

Check the Windows Event Viewer for Windows Logs and for IIS

If thats no help search google https://www.google.com/search?q=DotNetCore+0x80070002
4 years ago
Yidna wrote:
Did you reboot server after install .NetCode code ?

Did you set the Application pool .NET CLR Version for the website to have "No managed code"

Have you set the directory permissions to allow access
i.e. add for your Application pool

User: IIS AppPool\Application pool
Allow Modify for Write Permisions

Try setting stdoutLogEnabled="true" and see what goes in the log file

Check the Windows Event Viewer for Windows Logs and for IIS

If thats no help search google https://www.google.com/search?q=DotNetCore+0x80070002


Yes to the first 2 questions.
When you say directory permissions to allow access for the Application Pool - what do you mean?
Never had to do any such thing before and the other DotNetCore 2.0 and 2.1 sites work just fine.

I will check the log file as you suggest (the Event Viewer is useless for this error - 80070002 is a Windows Update error code! which is why Googling it only brings you to WUD problems - there's nothing wrong with the OS (16 sites run on it from ClassicASP, MVC, ASP.Net, And Core 1.1,2.0,2.1 sites) nor IIS.
4 years ago
The saga continues...
Log files are now created, but they are empty. UGH!
Since the DotNetCore 2.0 and 2.1 sites are working and their respective web.config files are using the same paths, '%LAUNCHER_PATH% %LAUNCHER_ARGS%', I believe there is a special setting for DotNetCore 2.2 that must be configured.  
I'll keep experimenting, but without a valid/meaningful error message, this could take a while.
4 years ago
Presuming that the PATH is simply not working for core 2.2, I decided to hard code the paths into the web.config file like so:
  <aspNetCore requestTimeout="23:00:00" processPath="dotnet" arguments=".\Nop.Web.dll" forwardWindowsAuthToken="false" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" startupTimeLimit="3600" >
      <environmentVariables />
    </aspNetCore>


I believe I'm getting somewhere on this as I get a new error
Application '...' with physical root '...' failed to start process with commandline 'dotnet .\Nop.Web.dll', ErrorCode = '0x80004005' : 1.


So, the problem appears to be with the environment variables, now I just need to figure out why it can't find the dll.
4 years ago
Finally, an error that appears to indicate the real problem here: permissions (what permissions? what process/account? IIS? )

Failed to add 'C:\Windows\system32\config\systemprofile\.dotnet\tools' to the PATH environment variable. Please add this directory to your PATH to use tools installed with 'dotnet tool install'.
System.UnauthorizedAccessException: Access to the path 'C:\Windows\system32\config\systemprofile' is denied.


More experimenting to come...
4 years ago
At a loss. I granted permissions to that folder IUSR with no change after rebooting. (which is extremely dangerous, so I'm reversing that)
It's got to be something simple!!!!!!!!!!!!!!!!!!!!!!!
MADNESS!!!!!!!!!!!!!
4 years ago
I had to set the directory permissions to allow access
i.e. add access for your Application pool
my AppPool is called nopCommerce42 the same as the IIS Website name

So goto Directory Security -> Edit -> Add
I added the user: IIS AppPool\nopCommerce42
And allowed Modify and Write Permisions

4 years ago
I went back, blew away the site, recreated the folder, and re-published everything. The process is finally running, however, it still generated a 500 Internal Server Error.
So I looked at the log generated and, at the tail end, I shows the following:

info: System.Net.Http.HttpClient.default.ClientHandler[101]
      Received HTTP response after 1428.6973ms - InternalServerError
info: System.Net.Http.HttpClient.default.LogicalHandler[101]
      End processing HTTP request after 1441.6258ms - InternalServerError


Unfortunately, the Event Viewer has no other info, so I have no way of knowing why this is happening.

I'm going to create a simple DotNetCore 2.2 application "Hello World" and get it running on IIS.
If it works, then clearly there's a bug with NC4.2 running on IIS8.0

I hang this up for the day - will move transition to 4.2 up another month until these issues can be resolved.
4 years ago
Yidna wrote:
I had to set the directory permissions to allow access
i.e. add access for your Application pool
my AppPool is called nopCommerce42 the same as the IIS Website name

So goto Directory Security -> Edit -> Add
I added the user: IIS AppPool\nopCommerce42
And allowed Modify and Write Permisions



Thanks.  I tried this with no luck. I've exhausted permissions as the cause (yes, even tried Everyone granted Full Access - just to verify it's not a permissions problem)

from what I can see on the forums, DotNetCore 2.2 is radically different from 2.1 and there are hundredd of suggestions (one, of which, is not to use IIS8.0 or below! - this may be an MS bug)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.