The requested page cannot be accessed because the related configuration data for the page is invalid

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)

iis
asp.net
asked on Server Fault May 18, 2018 by kirsten g • edited May 18, 2018 by kirsten g

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0