Http Error 500.19 When Publish .Net Core Project into Iis with 0X80070005

HTTP Error 500.19 when publish .net core project into iis with 0x80070005

The identity under which your web application runs in IIS doesn't have full access to the folder in which the web.config file is found.
Which version of IIS are you using? Assuming 7, you can view/change the identity through the 'Advanced Settings' of the application pool that hosts your application. Folder permissions can be granted via Windows Explorer in the usual way.

HTTP Error 500.19 IIS .net core 2.1 with error code 0x80070005

Cannot read configuration file due to insufficient permissions

You're hosting the site from your user profile. The user running the application pool in IIS doesn't have permissions to read from your profile.

Deploy the site to a folder that the IIS app pool user has permissions to.

IIS 500.19 with 0x80070005 The requested page cannot be accessed because the related configuration data for the page is invalid error

The message is saying that your configuration file is corrupt in some way. However it also says that it can't actually access the config file. So I'd ignore the original message about corruption/lack of validity as this is most likely just the effect of not being able to read the file due to a lack of authorization.

The reason it cannot read the config file is because the process running your web app does not have permission to access the file/directory. So you need to give the process running your web app those permissions.

The access rights should be fairly straightforward, i.e. at least Read, and, depending on your app, maybe Write.

Above, you mention IUSR etc. not being in the properties for web.config. If by that you mean that IUSR is not listed in the security tab of the file then it's a good thing. One doesn't want to give IUSR any kind of permission to web.config. The role IUSR is an anonymous internet user.

The file web.config should only be accessible through your application.

The problem is you haven't said which OS and IIS version you are using so it's difficult to advise which steps to take.

I.e. in IIS 7.5, the error message you're quoting is likely to occur due to your ApplicationPoolIdentity not being assigned the permissions. Your web application belongs to an application pool and so you need to give the permissions to the OS account that your web application's application pool runs under. Often this is something like NetworkService but you may have customized it to run under a purpose made account. Without more info it's difficult to help you.

When Publish sample project of .net core web app in IIS getting HTTP Error 500.19 Internal Server Error

As far as I know, if you want to host asp.net core application on IIS, you should make sure you have installed the asp.net core host bundle.

I suggest you could try to download it from this url and install it.

More details, you could refer to this article.

Notice:

If the Hosting Bundle is installed before IIS, the bundle installation must be repaired. Run the Hosting Bundle installer again after installing IIS.

HTTP Error 500.19 in IIS 10 and Visual Studio 2017

  1. Press Win Key+R to Open Run Window
  2. in the Run Window, enter "OptionalFeatures.exe"
  3. in the features window, Click: "Internet Information Services"
  4. Click: "World Wide Web Services"
  5. Click: "Application Development Features"
  6. Check the features.

I'm using Windows 10

Note: "You must be signed in as an administrator
to be able to turn Windows features on or off." If Windows Features is
empty or blank, then double-check to make sure that the Windows
Modules Installer service is enabled and set to Automatic.

Update:

Make sure .NET Core Windows Server Hosting bundle is installed

Other possible solutions:

Solution 1:

Run these two commands from an elevated command prompt

%windir%/system32/inetsrv/appcmd unlock config /section:anonymousAuthentication

%windir%/system32/inetsrv/appcmd unlock config -section:windowsAuthentication

Solution 2: Using PowerShell

Install-WindowsFeature NET-Framework-Core
Install-WindowsFeature Web-Server -IncludeAllSubFeature
Install-WindowsFeature NET-Framework-Features -IncludeAllSubFeature
Install-WindowsFeature NET-Framework-47-ASPNET -IncludeAllSubFeature
Install-WindowsFeature Application-Server -IncludeAllSubFeature
Install-WindowsFeature MSMQ -IncludeAllSubFeature
Install-WindowsFeature WAS -IncludeAllSubFeature

Solution 3: Removing the <rewrite> tag in web.config

<system.webServer>
...
<rewrite>
...
</rewrite>
</system.webServer>


Related Topics



Leave a reply



Submit