IIS Server & ASP.Net Core - 500.19 with error code 0x8007000d on httpplatformhandler tag

C#asp.netWeb ConfigIis 7.5

C# Problem Overview


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>

C# Solutions


Solution 1 - C#

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: docs.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

Solution 2 - C#

Solution 3 - C#

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

Solution 4 - C#

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

Solution 5 - C#

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionandreView Question on Stackoverflow
Solution 1 - C#The Red PeaView Answer on Stackoverflow
Solution 2 - C#Ehsan Zargar ErshadiView Answer on Stackoverflow
Solution 3 - C#DaltonView Answer on Stackoverflow
Solution 4 - C#Leniel MaccaferriView Answer on Stackoverflow
Solution 5 - C#RobSiklosView Answer on Stackoverflow