1

I'm using Aspnet core (2.1) with Full framework (4.7, we have some WCF WS-* Services that we want to use) and whenever I use publish , the generated web.config does not work. Starting the website (using IIS 7.5, on my Windows 7 machine) and trying to reach it from a webbrowser, I get the classic 502.5 error and if I look into my event viewer, I find an error similiar to this :

Application 'MACHINE/WEBROOT/APPHOST/MYWEBSITE' with physical root 'C:\inetpub\MyWebSite\' failed to start process with commandline '.\MyWebSite ', ErrorCode = '0x80070002 : 0.

Since I know 8007002 is ually a file not found error, i decided to take a look at the web.config generated and I can see that the aspNetCore line looks something like this :

<aspNetCore processPath=".\MyWebSite" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" /> 

Adding the extension (.exe) to MyWebSite so that it matches the file, fixes the issue. It's not hard for me to fix it, but I'd like to automate deployments and I'd like to avoid having to make something that will fix this file.

Am i doing something wrong or is there a way to force the extension?

Carl Quirion
  • 765
  • 5
  • 25
  • Copy the patched `web.config` to your project itself, and then the publishing process will use your correct version instead of generating a broken one. It is not surprising to see such bugs, as VS guys might not be IIS gurus. – Lex Li Oct 29 '18 at 19:48
  • Quite strangely, if I do that, all the values i configure are kept BUT processPath is overwritten... For example, if i include this in the web.config of my project : I get the following output: Both stdoutLogEnabled and stdoutLogFile are kept but not processPath. – Carl Quirion Oct 30 '18 at 14:07
  • I guess i will open up an issues with the net core team, see how that goes... – Carl Quirion Nov 05 '18 at 15:55

1 Answers1

1

Turns out this is by design, if I deploy specifying -r win, i do get the file extension in the web.config.

Carl Quirion
  • 765
  • 5
  • 25