Deployed ASP.NET MVC Core 1.1.1
on Windows 2012 Server R2
. Followed this ASP.NET article (installed DotNetCore.1.0.5_1.1.2-WindowsHosting bundle etc). App runs fine as localhost on the server if we follow the following steps:
- In cmd from root dir of the app, ran: dotnet MyWebapplication.dll
- Noticed that application is running and waiting for responses on localhost:5000.
- Opened the browser on the host server and navigated to:
http://localhost:5000
- Home page opened as expected
But when we navigate to the
http://IP Address/MyWebapplication
on a different desktop on the same network, we get the500 - Internal Server Error
NOTE: We tested that if we host a simple web app (not ASP.NET Core) with just one Index.html page on IIS, we can access the app from another machine on the same network via, say, http://IP Address/MySimpleHtmlApp
. So issue seems to be related to something on ASP.NET Core deployment on IIS. Question: What we may be missing and how to resolve it?
UPDATE: The IIS has default port 80 that is open. When we run the app directly from IIS on the server (i.e., http://localhost:80/MyWebapplication) it gives the following error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x8007000d
Config Error
Config File \\?\D:\TestApp\PublishOutput\web.config
Requested URL http://localhost:80/TestWebApp
Physical Path D:\TestApp\PublishOutput
Logon Method Not yet determined
Logon User Not yet determined
Config Source:
-1:
0:
Following is the web.config file (created by VS2017
):
<?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=".\TestWebApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
<!--ProjectGuid: 21c38c6d-7aff-4624-b310-a0f5f766b461-->