IIS Server status 500 error 0x8007000d - what's the "malformed xml element" in web.config?

1

I've deployed my Asp Net Core 2.0 app to an IIS server following this guide but I get 0x8007000d status 500 error.

According to Microsoft's support website,

This problem occurs because the ApplicationHost.config file or the Web.config file contains a malformed XML element.

But I can't understand what's wrong with it... Can you help me, please?

Here's my web.config file:

<?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=".\MyFirstAngularApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
  </system.webServer>
</configuration>
http
iis
web-config
iis-8.5
asked on Stack Overflow Apr 24, 2018 by Santa Cloud • edited Apr 24, 2018 by Santa Cloud

2 Answers

2

I had the same error when trying to deploy my Asp Net Core 3.1 app to IIS. It turns out, it had nothing to do with my web.config file containing a malformed XML element, rather it was something else.

I needed to install the Asp Net Core hosting bundle. https://dotnet.microsoft.com/download/dotnet-core/3.1

This article helped me out. https://dotnetcoretutorials.com/2019/12/23/hosting-an-asp-net-core-web-application-in-iis/

answered on Stack Overflow Mar 25, 2020 by Josh
1

The best way to deal with this situation is to go step by step and comment out certain sections of web.config and application host.config file and check for application behavior.

So if the application still continues to throw an error after you have commented a section, then the error is elsewhere. Keep doing this and you will finally arrive at the section that is malformed.

answered on Stack Overflow Apr 25, 2018 by Parvez Mulla

User contributions licensed under CC BY-SA 3.0