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
Ok I am running IIS 10

This is the page that talks about those permissions and yes it does say minimim IIS 10 for some stuff

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2
4 years ago
Well, it runs, somewhat, but static content yields a 500 Internal Server Error.
There is no reason I can think of why this is happening.
I've set security to the publish folder to Everyone, with Full Control, and the problem persists.
Same with IUSR, and the Application Pool identity.  It's God-Mode and I can't even see favicon.ico (without a 500 error).
The site partially shows up, but ALL  static files generate a 500 Error!

I see things like this in the log file:
info: System.Net.Http.HttpClient.default.ClientHandler[101]
      Received HTTP response after 22.0264ms - InternalServerError


Maybe the Publish settings are off somehow? Makes no sense, since I can run this in Windows 8 just fine (which is identical to Windows Server 2012 - so it can't be an incompatibility - none were listed anywhere regarding Server 2012, so I'm back to thinking that there's a configuration file somewhere in NopCommerce 4.2 or IIS 8.0 that is messing Core 2.2 up)
4 years ago
Well, it runs, somewhat, but static content yields a 500 Internal Server Error.
There is no reason I can think of why this is happening.
I've set security to the publish folder to Everyone, with Full Control, and the problem persists.
Same with IUSR, and the Application Pool identity.  It's God-Mode and I can't even see favicon.ico (without a 500 error).
The site partially shows up, but ALL  static files generate a 500 Error!

I see things like this in the log file:
info: System.Net.Http.HttpClient.default.ClientHandler[101]
      Received HTTP response after 22.0264ms - InternalServerError


Maybe the Publish settings are off somehow? Makes no sense, since I can run this in Windows 8 just fine (which is identical to Windows Server 2012 - so it can't be an incompatibility - none were listed anywhere regarding Server 2012, so I'm back to thinking that there's a configuration file somewhere in NopCommerce 4.2 or IIS 8.0 that is messing Core 2.2 up)
4 years ago
I blew away everything (again): website, folders, permissions, everything.
I uninstalled the DotNet Core 2.2 hosting package, rebooted server, reinstalled it and verified that it is installed perfectly (Modules check first, then went into the system32, found the dll and verified it to be the correct one).

I re-published to a file and uploaded the NC 4.2 (mind you, NopCommerce 4.2 has not been altered in any way shape or form - verified this with WinMerge).
FYI: This was an upgrade from 4.1 to 4.2, the SQL upgrade script was run, all data/images/etc are identical!  The site runs perfectly from Visual Studio 2017.

I changed the IUSR permissions to Modify where needed (web.config, AppData, images, bundles, etc)
I rebooted the server for good measure.

Same problem -static files are not served correctly (ARRGGGHH!!!)
example error:
The script from “https://www.____.com/lib/jquery/jquery-3.3.1.min.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type

I verified MIME types to be 100% correct. All other websites running on IIS are serving up static files just fine (dotnetcore 2.0, & 2.1, ASP.Net webforms, ASP.Net MVC all working just fine!)

In the browser development console, I can see many errors (all regarding javascript being served w/incorrect MIME type - which is a completely bogus error since I verified in IIS, that they are served as "TEXT/JAVASCRIPT" (If I could upload pictures to this forum, I could show screenshots)
If I try to just load favicon.ico, the BINARY is spit out onto the web page (instead of the icon)! WTF?  DotNetCore 2.2 is completely ignoring the MIME types (which, is probably why nothing is working - only basic HTML is displayed)

I'm at a loss as to how to solve this.
4 years ago
You don't have to run ASP.NET core 2 apps in IIS, although it may be desirable:
https://weblog.west-wind.com/posts/2016/jun/06/publishing-and-running-aspnet-core-applications-with-iis.

You may want to get it to run standalone first, just to be sure you don't have other infrastructure problems.
4 years ago
Not sure what you mean by run it without IIS. IIS doesn't actually run Core at all, it just redirects the pipeline to Kestrel, regardless.
I'm just not sure what settings need to be changed in NC4.2 code, since, out of the box, NC4.2 will simply not run correctly.  There's got to be a simple setting somewhere in a config file or json file, but DotNetCore 2.2 doesn't play nice.
I wish the documentation would cover installation - it's outdated.
4 years ago
Okay. I was beating a dead horse. NopCommerce 4.2 won't run as is in Visual Studio 2017 (Download the source code, build, and run in Kestrel mode - Nop.Web, and see the 500 errors and an unformatted page load up).  It will run, however, no static files will be shown (in Chrome, for example, you'll get dozens of ERR_SSL_PROTOCOL_ERROR in the browser console).
Apparently, my IIS(8.0) version of Kestrel (in the SDK 2.2.107) is the same, so it doesn't work either.

The ApplicationBuilderExtensions.cs seems to be ignored (i can see the UseStaticFiles is specified, so there's no reason why it shouldn't work).

Regardless, I'm going to download and install VS2019, and install the Dotnet Core 2.2 SDK compatible with VS2019 after uninstalling the 2.2.107, which is not compatible, and see if this fixes the problem (after compiling in VS2019).
4 years ago
More madness ensues. Visual Studio 2019 worked in both IISExpress 10 and Nop.Web (Kestrel).
I uploaded the changes, and it did not work on IIS8.0 (Internal Server Error) - and, naturally, the log file does not give any more info as to what the exact error is.

Back to square one, I figure the incorrect version of DotNetCore 2.2.???? was installed (I checked and it was 2.2.107), so I downloaded and installed the latest SDK 2.2.3 (noting that 2.2.5 was not listed as an SDK but only as a runtime).
I did that, and, it stopped working from VS2019 (either mode)!

Since the server is running 2.2.5 and the SDK's highest version is 2.2.3, I figure the server's runtime needs to be downgraded to 2.2.3.
In addition, since in VS2019, after upgrading to 2.2.3 from 2.2.107 NC4.2 no longer worked, perhaps I need to downgrade the version on both the server and VS2019 to 2.2.107  (a giant leap backwards, but after 38 hours of hair pulling and experimenting, I don't really care anymore -just want this to work!!!)  I'm going to check the source code again and see if the dlls from Nop were compiled in a much lower version.  Looks like a long week debugging something that should work out of the box (would love to donate $$$ to Nop team, but I'll donate my time and get this squared away so others don't have this same nightmare).
4 years ago
Solved! For IIS 8.0 (Windows Server 2012)

First off, do NOT install the SDK to the server hosting IIS.

Install the version 2.2.3 (not anything higher or lower) of the hosting bundle. MS wants you to install the later version, but it will only give you a headache. (this may not be the case for IIS 8.5 and above)

Make certain that the SDK on your development machine is also 2.2.3 and you're using VS2019 (VS2017 stopped working properly after the last patch from MS).

Make sure it is built on aforementioned machine (published)

Note: It is not possible to run NC4.2 from VisualStudio 2017 or 2019 in non-SSL mode (somewhere in the code, there is some sort of https redirect - doesn't matter if you set ForceSSLforAllPages = false and set your store to not use SSL, nor modify the launchSettings.json file and remove all references to using https - after the first page is loaded, any subsequent requests will always be https!  Go figure!  Maybe a programmer can tell us where this is happening, as I can't find anything that would cause this behavior)

Note #2: Make sure your url in the store table begins with http:// even if SSLEnabled is true (as I mentioned earlier, you cannot run NC4.2 in non-secure mode no matter what settings you pick - something in the code is preventing this - if somebody knows what this is, please let idiots like me know)

Note #3: There is no need to run around your folders making security changes for your Application Identity if you're using the default one, though you DO need to set appropriate permissions for the IUSR account.

Note #4: Many of the features in Core 2.2 are not valid/available for IIS8.* (in other words - you shouldn't need to toy with the web.config settings -many suggested will crash your site)
Move to Server 2016 (IIS10).

Hope this helps somebody. (now I can finally get to customization :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.