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?
Turns out this is by design, if I deploy specifying -r win, i do get the file extension in the web.config.