Do you have web.config? Is it included in your .json project like this:
"publishOptions": { "include": [ "wwwroot", "web.config" ] }
Your web.config will look something like this:
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <handlers> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/> </handlers> <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/> </system.webServer> </configuration>
Note. The environment variables LAUNCHER_PATH and LAUNCHER_ARGS may be the source of your problem. You are trying to run publishing scripts that run in visual studio, it is possible that visual studio sets the values ββin the environment before running the scripts.
In order to get the RC2 site and run on Azure VM, I had to change this line to look like this:
<aspNetCore processPath="dotnet" arguments="./YourAppEntryPoint.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
Try setting your web.config with explicit values. If your deployment works, then you know its missing ENVVARS, which confuse it.
Notmsyself
source share