IIS HTTP Error 500: The requested Page cannot be accessed because related configuration data is invalid

18,419

It was missing the NET Core Windows Server Hosting bundle, I have realized that from the web.config "AspNetCoreModule".

You can find the link here

Share:
18,419
Hussein Salman
Author by

Hussein Salman

Engineering Manager & Cloud-Native Architect, focusing on Kubernetes, Containers & Microservices. Check out my youtube channel: https://www.youtube.com/channel/UCoAh8g6dmwXQUwKhkggUFIA

Updated on June 16, 2022

Comments

  • Hussein Salman
    Hussein Salman almost 2 years

    I have successfully published an ASP.NET Core website on IIS (version 10) on my local machine (Windows 10) and browsed it.

    However, when I deploy it on IIS on another PC (using same versions), it gives HTTP Error 500.19:

    enter image description here

    I am using the same Web.config and IIS_IUSRS has permissions on both the virtual directory and config file. I also added the permission for the app pool `IIS AppPool/MyPool' to the virtual directory. Here is the 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=".\IdentityServer.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
      </system.webServer>
    </configuration>
    

    What is problem?

  • Sean
    Sean about 6 years
    Thank you!! Hours and hours it took me to find your solution that finally worked.
  • Code Tree
    Code Tree over 4 years
    what the heck..it is not mentioned anywhere in the official docs..
  • ShresthaGanesh
    ShresthaGanesh almost 3 years
    thanks. At least passed this phase of error.