I have Asp.Net Core application and I create a new project on the solution as an Entry Point, like this:
public static int Main(string[] args)
{
var commandLine = Environment.CommandLine.ToLowerInvariant();
if (commandLine.IndexOf("--mode=web") > 0)
return Web.Program.Main(args);
if (commandLine.IndexOf("--mode=database") > 0)
return Database.Program.Main(args);
return -1;
}
I added the web.config like this:
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="dotnet"
arguments=".\AlbumApi.dll --mode=web"
stdoutLogEnabled="false"
stdoutLogFile=".\logs\stdout"
hostingModel="inprocess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development"/>
<environmentVariable name="CONFIG_DIR" value="f:\application_config"/>
</environmentVariables>
</aspNetCore>
</system.webServer>
Then I catch the bellow error on the Windows Event Viewer:
Application 'MACHINE/WEBROOT/APPHOST/ALBUMAPI' with physical root 'F:\Artifacts\AlbumApi\' failed to start process with commandline 'F:\Artifacts\AlbumApi\AlbumApi.dll --mode=web', ErrorCode = '0x80004005' : e0434352.
What should I do?
Thanks.
User contributions licensed under CC BY-SA 3.0