title: "500 - Internal server error" when calling ASP.NET Core 2.1 Web API on Windows Server
body: <p>I have an ASP .Net Core 2.1 Web API which I've deployed to a new server we recently purchased (running Windows Server 2016 Standard). The API works perfectly on both my development PC and our old server (running Windows Server 2012 R2). But on this new server, I get this error:</p>
  <pre><code>500 - Internal server error.
  There is a problem with the resource you are looking for, and it cannot be displayed.
  </code></pre>
  <p>I remember a year ago also struggling a lot trying to get it to run on our old server. I did eventually get it to work, but I can't remember what I did! Is there any way to get more information on this error? I've checked the Windows Event Viewer on the new server and there is nothing there. Also, although I've got <strong>stdoutLogEnabled=&quot;true&quot;</strong> in my <em>web.config</em>, it's not generating the log - and I've created the <em>\logs\stdout</em> path so the folders do exist...</p>
  <p>I've also got <strong>app.UseDeveloperExceptionPage();</strong> in my <em>Startup.cs</em>, but I'm not getting any more info that a simple 500 internal server error.</p>
  <p>This is what my web.config looks like:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;configuration&gt;
    &lt;location path=&quot;.&quot; inheritInChildApplications=&quot;false&quot;&gt;
      &lt;system.webServer&gt;
        &lt;handlers&gt;
          &lt;add name=&quot;aspNetCore&quot; path=&quot;*&quot; verb=&quot;*&quot; modules=&quot;AspNetCoreModule&quot; resourceType=&quot;Unspecified&quot; /&gt;
        &lt;/handlers&gt;
        &lt;aspNetCore processPath=&quot;dotnet&quot; arguments=&quot;.\PropWorx.API.dll&quot; stdoutLogEnabled=&quot;true&quot; stdoutLogFile=&quot;.\logs\stdout&quot; /&gt;
      &lt;/system.webServer&gt;
    &lt;/location&gt;
  &lt;/configuration&gt;
  &lt;!--ProjectGuid: cfa62a1f-c5f6-43f8-bcbe-04068e40b803--&gt;
  </code></pre>
  <p>I've also got the <strong>Microsoft .NET Core 2.1.1 - Windows Server Hosting</strong> installed and the <strong>Microsoft .NET Core Runtime - 2.1.1</strong> installed (both x86 and x64).</p>
  <p>Like I said it works on my development PC and on our old server, so it must be a configuration issue on the new server. Is there a way I can get more detailed error information other than just 500 Internal Server Error?</p>