title: IIS HTTP Error 500: The requested Page cannot be accessed because related configuration data is invalid
body: <p>I have successfully published an ASP.NET Core website on IIS (version 10) on my local machine (Windows 10) and browsed it.</p>
  
  <p>However, when I deploy it on IIS on another PC (using same versions), it gives <em>HTTP Error 500.19</em>:</p>
  
  <p><a href="https://i.stack.imgur.com/i6xrO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/i6xrO.png" alt="enter image description here"></a></p>
  
  <p>I am using the same <code>Web.config</code> and <em>IIS_IUSRS</em> 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:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" /&gt;
      &lt;/handlers&gt;
      &lt;aspNetCore processPath="dotnet" arguments=".\IdentityServer.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" /&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>What is problem?</p>