1

I want to test my ASP.Net Core 2.0 Hello World Api on localhost.

I Created the project using VS2017 File->New Projecct-> .Net Core -> ASP.NET Core Web Application -> Empty

It ran fine in the debugger

Next I right clicked the solution and selected publish to create the publish folder.

I copied the contents of the publish folder to c:\inetpub\wwwroot

I set the application pool to No Managed Code and ran Iisreset

When I browse to localhost I get

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       Unknown
Handler    Not yet determined
Error Code     0x8007000d
Config Error       
Config File    \\?\C:\inetpub\wwwroot\web.config

Requested URL      http://localhost:80/
Physical Path      
Logon Method       Not yet determined
Logon User     Not yet determined

Config Source:
   -1: 
    0: 

More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
View more information »

The contents of web.config is

<?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=".\WebApplication1.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
  </system.webServer>
</configuration>
<!--ProjectGuid: e0c1b13d-2f11-4e4f-9b5d-3150bdecd831-->

I don't think it is a permissions thing because before I pasted the project I had a simple index.html and localhost worked fine.

WinVer reports that I am running Windows 10 Version 1803 ( OS Build 17134.48)

  • 1
    jexusmanager.com/en/latest/tutorials/oob-500.html Jexus Manager would tell you which OOB module is missing. In your case, very likely that .NET Core server bundle is missing. – Lex Li May 19 '18 at 10:35
  • I guess looking at web.config, that is the only candidate. Why is the publish not including it? – kirsten g May 19 '18 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.