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-->
nam
  • 21,967
  • 37
  • 158
  • 332
  • Share the web.Config, the error implies it's missing some values. – Tratcher Oct 07 '17 at 07:13
  • It''s likely a permissions issue. To confirm this, change the app pool to `localsystem` and see if it is still produces an error. --- don't forget to switch it back!! Also, make sure you have installed the hosting bundle on the server and restart (if you had not done so already) – Svek Oct 07 '17 at 07:18
  • You can also have a read through this, it also looks like there are alternative solutions that change the target framework in the `csproj` to `netcoreapp1.1.2` -- https://github.com/aspnet/Hosting/issues/844 – Svek Oct 07 '17 at 07:22
  • @Tratcher Per your request I've added an **UPDATE ** section along with `web.config`. I tend to agree this file may be missing some values. – nam Oct 07 '17 at 16:50
  • 1
    Hmm, that web.config looks fine. – Tratcher Oct 08 '17 at 14:38
  • @Tratcher. Thank you for confirming that web.config looks fine. We went to the IIS and noticed that our server team that had setup the website and had given us the url `http://CompanyName/AppName` had `AppName` as a Virtual Directory. Once we converted that from Virtual Directory to Application, it started working. But we still have `IE11 Document Mode 7` issue that does not seem to be related to .NET Core. The issue is posted [here](https://stackoverflow.com/q/46627479/1232087). App works fine on Chrome browser. – nam Oct 08 '17 at 16:20

0 Answers0