Troubleshooting: HTTP Error 500.21 - Internal Server Error Handler "aspNetCore" has a bad module "AspNetCoreModule" in its module list

When you try to access the Microsoft Dynamics NAV Web client, you get the following error:

HTTP Error 500.21 - Internal Server Error Handler "aspNetCore" has a bad module "AspNetCoreModule" in its module list

Resolution

This error can occur if the AspNetCoreModule is not installed properly in IIS on the computer that is running the Microsoft Dynamics NAV Web Server components. The AspNetCoreModule is installed with the Microsoft .NET Core Windows Server Hosting bundle. You can get this error if this has been not been fully installed or the installation has been damaged in some way.

To resolve this issue, open Programs and Features in Control Panel and check whether Microsoft .NET Core Windows Server Hosting is installed. Then, try one of the following:

  • If it is installed, repair it from Programs and Features, by selecting it, choosing Change, and then choosing Repair.

  • If it is not installed, download and install Microsoft .NET Core - Windows Server Hosting bundle.

See Also

Deploying the Microsoft Dynamics NAV Web Server Components
Troubleshooting the Microsoft Dynamics NAV Web Client Installation
How to: Install the Web Server Components