Machine: Windows Server 2012 R2 with IIS 8.5 on a company network.
Following this tutorial
ASP.NET MVC Core 1.1.1
app to an Application Folder under Default Website
. From a desktop on the same network, browsed to the URL http://IP Address/MyPublishedFolder
. The app successfully displayed its home page.Ourapps.ac.CompanyName.com
with host folder named as Ourapps.ac.CompanyName.com
. Copied the exact same published folder MyPublishedFolder
to Ourapps.ac.CompanyName.com
. From a desktop on the same network, browsed to the URL: http://Ourapps.ac.CompanyName.com/MyPublishedFolder
. Got the browser error: HTTP Error 502.5 - Process Failure
. In the Event Viewer, the Application Log shows the following error:
Application 'MACHINE/WEBROOT/APPHOST/Ourapps.ac.CompanyName.com' with physical root 'C:\Ourapps.ac.CompanyName.com\' failed to start process with commandline '"" ', ErrorCode = '0x80070057 : 0.
Question: Why the same app is working under Default Website
but not under custom website - and how can we resolve the issue?
Note:
http://Ourapps.ac.CompanyName.com/MyPublishedFolder
works fine if I replaced all content of MyPublishedFolder
with a simple Index.html file created on a notepad. So the issue does seem to be related to ASP.NET Core's published folder deployed to a custom website
Both the apps on the above examples are running with a No Managed Code
Application Pool.
UPDATE:
Web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\MyCoreWebApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
</system.webServer>
</configuration>
<!--ProjectGuid: 9e4933bc-a6d0-4aa8-b34c-c6db94ed0742-->
User contributions licensed under CC BY-SA 3.0