How to solve Http Error 500.19 Internal Server Error in windows server IIS for Dotnet Core application

If you are a Dotnet Core developer working with a Windows Server, you may have encountered the dreaded HTTP Error 500.19 – Internal Server Error while running your application on IIS (Internet Information Services). This error can occur due to a variety of reasons such as incorrect file permissions, configuration issues, or missing modules.

Fortunately, fixing this error doesn’t have to be a daunting task. In this blog post, we’ll explore some tips and tricks to help you diagnose and resolve the Http Error 500.19 in IIS for Dotnet Core applications. We’ll cover common causes of the error, walk through the troubleshooting steps, and provide actionable solutions to get your application up and running again. So let’s dive in and learn how to fix this frustrating error once and for all!

Fixing Internal Server Error 500.19 in IIS for Dotnet Core Apps

According to one of the Articles in MSDN on this error, the common HResult code is 0x8007000d. This problem occurs because the ApplicationHost.config file or the Web.config file contains a malformed XML element.

Steps to resolve:

  1. Check the file. Web.Config file is available inside the root folder of your application.
  2. The ApplicationHost. config file can be found in the folder %WINDIR%\system32\inetsrv\config. It is the root file of the configuration system when you are using IIS 7 and above.

If you have not solved the issue with the above two steps then follow the below troubleshooting steps to identify the issue.

Troubleshooting for HTTP Error 500.19 when publishing .net core project into IIS with 0x80070005

Firstly, to isolate the issue, you should identify what other dotnet applications are hosted in the IIS. For example, if there is a dot net framework application hosted and whether it is working fine or not.

Is your current application is built with Dotnet core?

Follow these steps as one of them will definitely solve your issue in IIS. Here is the video tutorial that shows the issue and the solution.

Working Solution – Real-time live example

Step 1

To run the Dotnet Core application locally using the command prompt, first, browse to the virtual directory of the application. Then, open the location in the command prompt and execute the following command: “dotnet <your application dll name>”. For example, if your application’s DLL name is “myapplication.dll”, you would run the command “dotnet myapplication.dll”.

This will show up any error associated with the application. If you see an error stating “dotnet command not recognized” then you need to install dotnet core SDK on the server. The latest SDK can be installed from the below link Download .NET Core

Step 2

Since you are reading this, I assume the above step did work and you were able to run the dotnet core application locally.

The next important step is to make sure you have ASP.NET Core Runtime installed on IIS to run the DOTNET Core application from IIS.

The ASP.NET Core Runtime enables you to run existing web/server applications. On Windows, we recommended installing the Hosting Bundle, which includes the .NET Core Runtime and IIS support.

Install the hosting bundle from the below link. Install the right file as shown in the image.

Download .NET Core

Hosting Bundle

Other Topics you might be interested

In conclusion, the Http Error 500.19 – Internal Server Error can be a frustrating issue to encounter when working with Dotnet Core applications on IIS. However, by following the tips and tricks outlined in this blog post, you can easily diagnose and resolve the error. By checking your file permissions, verifying your module configuration, and using the appropriate tools, you can get your application up and running again in no time. Remember to take a systematic approach to troubleshoot and to use the appropriate resources to help you solve the issue. With the right mindset and tools, you can conquer the Http Error 500.19 and keep your Dotnet Core application running smoothly on IIS.

Leave a Reply

Your email address will not be published. Required fields are marked *

Verified by MonsterInsights