When trying to launch a ASP.NET 6 Application on IIS. I am getting the below error

Error 500.19 – Internal Server

Error Error Code 0x8007000d

I can confirm that the correct .NET Hosting Bundle is installed as well.

The message says that

Delete the malformed XML element from the ApplicationHost.config file or from the Web.config file.

However, the application works fine locally in the development environment. What could be the reason of the error?

Question is closed for new answers.
admin Selected answer as best May 19, 2023