- Home
- .NET tutorials
- Four reasons why your ASP.NET Core application is not working in IIS
Four reasons why your ASP.NET Core application is not working in IIS
Published: Tuesday 15 September 2020
We are going to explore four potential reasons why your ASP.NET Core Application is not working in IIS.
Problem #1: Permissions
So you've published your ASP.NET Core application. You've set up a website in IIS pointing to your published folder.
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Config Error: Cannot read configuration file due to insufficient permissions
500.19 Error when Running an ASP.NET Core Application in IIS
This error is because IIS does not have the correct permissions to render your ASP.NET Core application.
In Windows 10, give IIS_IUSRS Full Control to your ASP.NET Core Application in IIS
This should resolve your issue.
Check the Application Pool Identity in IIS when running an ASP.NET Core Application
If you are using a Custom Account, you will probably need to give full permissions to that account as well.
Problem #2: Installing ASP.NET Core Runtime
If you are running an ASP.NET Core application, you must install ASP.NET Core Runtime onto the machine that is running your application through IIS.
For IIS, download the Hosting Bundle from the Windows OS to download ASP.NET Core Runtime & additional IIS runtime support
Problem #3: Different ASP.NET Core Runtime Version
It's easily done. You've successfully deployed your ASP.NET Core application onto IIS and everything is fine.
HTTP Error 500.21 - Internal Server Error
Handler "aspNetCore" had a bad module "AspNetCoreModuleV2" in its moudle list
500.21 Error when Running an ASP.NET Core 3 Application with ASP.NET Core Runtime 1
Now I must stress that you might not get any error when you upgrade your ASP.NET Core version for your application without upgrading your ASP.NET Core Runtime.
Problem #4: A Runtime Error With Your Application
This one was raised by Chaker Aich on my YouTube channel.
HTTP Error 500.30 - ANCM In-Process Start Failure
500.30 Error when Running an ASP.NET Core Application in IIS
This is a problem with your ASP.NET Core application rather than IIS. There is a runtime error.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\RoundTheCode.ReactSignalR.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
</configuration>
Now the stdoutLogEnabled attribute should be set to false. By setting that to true, you should be able log the runtime error that you are getting in your application.
Still Stuck?
If you are not quite following the solutions to the fixes, you can watch us demonstrate these errors and applying fixes.
Latest tutorials
File logging in ASP.NET Core made easy with Serilog
Learn how to add file logging to an ASP.NET Core app using Serilog, including setup, configuration, and writing logs to daily rolling files.