63

I am getting the following error when I try to launch my ASP.Net Core App using IIS Server v7.5 ... I published the website (File System option in Visual Studio) to a specific directory successfully. It launches fine from approot/web.cmd file. But when I try to hook it up to IIS Server and point it to the wwwroot folder, I get the following error:

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 \?\D:\WebDevelopment\UAT\creativeNamePROD\wwwroot\web.config
  • Requested URL http://10.2.177.226:59/
  • Physical Path
  • Logon Method Not yet determined
  • Logon User Not yet determined
  • Failed Request Tracing Log Directory

Below are two different web.config files I tried any neither one worked. When I try to get into Configuration Editor within IIS, I get an unclear error as well. Any help would be greatly appreciated!!!

<configuration>
<system.web>
  <httpRuntime maxQueryStringLength="64768" maxUrlLength="65536" />
</system.web>
<system.webServer>
<security>
  <requestFiltering>
    <requestLimits maxQueryString="64768" />
  </requestFiltering>
</security>
<handlers>
  <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout.log" startupTimeLimit="3600"></httpPlatform>
</system.webServer>
</configuration>

Web.config #2 -gets the same error

<configuration>
  <system.webServer>
    <handlers>
      <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
    </handlers>
    <httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout.log" startupTimeLimit="3600"></httpPlatform>
  </system.webServer>
</configuration>
3
  • same error for me, but just a hint, on my windows 10 machine it works fine, but same exact files, deployed on Win Server 2013 R2, results in above error Feb 1, 2017 at 12:09
  • 5
    Did you install the .NET Core Windows Server Hosting bundle? This is needed for IIS to work as a reverse proxy for the .net core libraries. You'll find the link in this article: learn.microsoft.com/en-us/aspnet/core/publishing/iis I had the same problem before installing this on my dev machine. Mar 28, 2017 at 6:31
  • 1
    To future readers. This question is valid for old ASP.NET Core releases (ASP.NET 5 RC or older builds), where there was no ASP.NET Core module, but only HTTPPlatformHandler (for httpPlatform tag). No one should see such a web.config any more.
    – Lex Li
    May 21, 2020 at 18:41

7 Answers 7

100

I was getting this error. I fixed this error by installing the .NET Core Windows Server Hosting bundle (vs the Runtime Bundle), as described in instructions like this one.

Install the .NET Core Hosting Bundle

Install the .NET Core Hosting Bundle on the hosting system. The bundle installs the .NET Core Runtime, .NET Core Library, and the ASP.NET Core Module. The module creates the reverse proxy between IIS and the Kestrel server. If the system doesn't have an Internet connection, obtain and install the Microsoft Visual C++ 2015 Redistributable before installing the .NET Core Hosting Bundle.

As @Patrick says you can download the bundle installables from this link.

After installing that Module, my app served (i.e. no 500 error).

I see @Jørgen made this comment on OP already, so he gets credit.

EDIT Please confirm you install the Hosting bundle vs the Runtime Bundle per comment by @MDave

Did you install the .NET Core Windows Server Hosting bundle? This is needed for IIS to work as a reverse proxy for the .net core libraries. You'll find the link in this article: learn.microsoft.com/en-us/aspnet/core/publishing/iis I had the same problem before installing this on my dev machine. – Jørgen Tvedt Mar 28 at 6:31

5
  • 1
    Get the install files from here: microsoft.com/net/download
    – Patrick
    Aug 8, 2018 at 0:26
  • 1
    FYI, for any literal programmers - I think what was meant in the second sentence is, "I installed..." as opposed to, "I did not install..." Oct 9, 2018 at 19:19
  • 2
    Fantastic! Life saver!! This is true even when we had .net core 2.1 hosting installed but only the 2.2 sdk but not the .net core 2.2 hosting. Thank you!!
    – Shiva Naru
    Dec 12, 2018 at 19:46
  • 2
    In my case I had installed the Runtime Bundle instead of the Hosting Bundle. After installing the Hosting Bundle it worked. Wasn't aware they were two different things.
    – MDave
    Jan 28, 2020 at 16:18
  • 1
    aha - thanks! I had assumed that because I had visual studio and asp.net core SDK installed, I would have everything I needed to run it but no, you need the hosting bundle as well
    – Andy
    Sep 26, 2020 at 9:22
9

The only solution worked for me was to install 2 more items from Microsoft dot net core library:

https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.0.6-windows-x64-asp.net-core-runtime-installer

and

https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.0.6-windows-server-hosting-installer

1
  • 1
    Hosting bundle contains the actual runtime, so usually people only need to install the Hosting bundle.
    – Lex Li
    Nov 3, 2018 at 22:57
4

This worked for me, delete file: project.lock.json and run dotnet restore, restart visual studio.

0

I was able to solve this same problem when running in Visual Studio Community 2017 v. 15.7.1.

Had to install the latest dotnet-sdk-2.1.300-rc1-008673-win-x64.

https://www.microsoft.com/net/download/dotnet-sdk-2.1.300-rc1-windows-x64-installer

1
  • You must have hit another issue. The SDK does not contain the server bundle, and so merely installing the SDK won't resolve "Error Code 0x8007000d". What you hit should be another error code.
    – Lex Li
    Nov 3, 2018 at 22:55
0

I had this problem with one .NET 6.0 site, but not another, so I knew the hosting pack was installed and functioning correctly.

The issue turned out to be that the broken site had some elements pertaining the URL Rewrite module, but the module wasn't installed.

Problem solved by either removing those elements, or installing the URL Rewrite module.

0

For me it worked and then after few weeks it stopped working with config error 500.19. After scratching my head for few hours. I downloaded the hosting bundle from https://dotnet.microsoft.com/en-us/download/dotnet/7.0 and repaired my already installed version and it worked.

0

TLDR: uninstalling the .NET Core Hosting Bundle and then reinstalling it fixed this issue for me.

There are many different situation that can produce this error. In my case I was using IIS 10 on Windows and .NET 6 trying to run and ASPNET Core Web App. The problem was that I had apparently installed the .NET Core Hosting Bundle before I had installed IIS. I was setting up a new machine and had a boatload of dev software to install.

At the time I was experiencing the issue I couldn't remember the order I had installed things but one SO post suggested that if I had installed them in the wrong order I could rerun the .NET Core Hosting Bundle installer and select the repair option. So I did that and the error persisted.

So sadly, for a long time I figured installing in the wrong order wasn't my issue. But....it was.

Turns out repair didn't fix the problem for me, but uninstalling the .NET Core Hosting Bundle and then reinstalling it did.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.