ASP.NET Core 1.1 works under Default website in IIS but not under a custom website

0

Machine: Windows Server 2012 R2 with IIS 8.5 on a company network.

Following this tutorial

  1. Success: In IIS, deployed a published folder of an 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.
  2. Failure: Created a custom website on the same IIS with one of the DNS Names at the company: 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 Websitebut not under custom website - and how can we resolve the issue?

Note:

  1. 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

  2. Both the apps on the above examples are running with a No Managed Code Application Pool.

UPDATE:

  1. Please note the same ASP.NET Core website works fine under Default Website on the same server. That means the sever has all the necessary configurations (hosting bundle DotNetCore.1.0.5_1.1.2-WindowsHosting installed etc.) for an ASP.NET Core 1.1.1 to run on IIS.

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-->
iis
asp.net-core
windows-server-2012-r2
iis-8.5
asked on Stack Overflow Oct 7, 2017 by nam • edited Oct 7, 2017 by nam

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0