Aspnet Core Self-Contained deploy's web.config missing file extension

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?

.net
asp.net-core
dotnet-publish
asked on Stack Overflow Oct 29, 2018 by Carl Quirion

1 Answer

1

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

answered on Stack Overflow Nov 8, 2018 by Carl Quirion

User contributions licensed under CC BY-SA 3.0