Overview
HTTP Error 500.19 means IIS couldn’t read the configuration for the page, so it stopped before running any of your code. The fix depends on the Error Code shown on the error page: 0x8007000d is a broken or unrecognised web.config (usually a <rewrite> or <aspNetCore> section for a module that isn’t installed), 0x80070021 is a section locked at server level, and 0x80070005 is IIS lacking permission to read the folder.
This guide is for anyone running a site on IIS on Windows Server 2019, 2022 or 2025, including sites on Plesk for Windows. It shows how to get the full error details, then gives the fix for each error code in the order I run into them on customer servers. Most cases take five minutes once you know which code you have.
What causes HTTP Error 500.19
Every 500.19 page has the same headline, “The requested page cannot be accessed because the related configuration data for the page is invalid.” The useful part is underneath it, in Detailed Error Information:
- Error Code: the HRESULT that tells you which kind of problem it is.
- Config Error: a sentence such as “Configuration file is not well-formed XML” or “This configuration section cannot be used at this path.”
- Config File: the exact file IIS was reading, such as
\\?\C:\inetpub\wwwroot\web.config. - Config Source: the offending lines, with the bad one marked.
The codes you will actually see, from most to least common:
| Error code | Meaning | Usual fix |
|---|---|---|
0x8007000d |
Bad XML or an unknown section | Fix the tag, or install the missing module |
0x80070021 |
Section locked by a parent config | Unlock it, or remove it from web.config |
0x80070005 |
Access denied reading config | Give IIS_IUSRS read access |
0x800700b7 |
Duplicate entry | Add a <remove> before the <add> |
0x80070003 |
Path or file not found | Correct the site’s physical path |
How to fix HTTP Error 500.19
Fix 1: Get the detailed error page
Visitors only see a short “500 – Internal server error” page. IIS shows the detailed version to requests made on the server itself, so connect with Remote Desktop and open the site in a browser there, using http://localhost/ or the site’s own hostname. If the site has a host-header binding only, add the hostname to the server’s hosts file pointing at 127.0.0.1 while you test.
On Plesk for Windows you can’t always RDP in. In that case, check the domain’s logs in Plesk; the detailed page is still only shown locally, so ask your host for the Error Code if you can’t see it.
Fix 2: 0x8007000d, the web.config is malformed or uses a missing module
Start by checking the XML itself. PowerShell will refuse to load a file that isn’t well-formed and tell you the line and position:
[xml](Get-Content "C:\inetpub\wwwroot\web.config") | Out-Null
No output means the XML is fine. An error such as “The ‘rule’ start tag on line 12 position 8 does not match the end tag of ‘rules'” points straight at the unclosed tag.
If the XML is valid, the file almost always contains a section for an IIS module that isn’t installed. The two I see every week are <rewrite> (needs the URL Rewrite module) and <aspNetCore> (needs the ASP.NET Core Hosting Bundle). Check which modules are present:
Get-WebGlobalModule | Where-Object { $_.Name -match "Rewrite|AspNetCore" } | Select-Object Name, Image
No RewriteModule in the list means URL Rewrite is missing: install URL Rewrite 2.1 from the official IIS downloads page and run iisreset. No AspNetCoreModuleV2 means the Hosting Bundle for your .NET version is missing; install it from Microsoft’s .NET download page and restart IIS. Deploying an ASP.NET Core app in Plesk covers the other startup errors you may hit next (500.30 and 500.31).
Once the module is installed, IIS can read the section and the 500.19 goes away without touching the file. If you copied rules from another server, compare them with the examples in web.config redirects and URL Rewrite rules.
Fix 3: 0x80070021, the configuration section is locked
The Config Error reads “This configuration section cannot be used at this path. This happens when the section is locked at a parent level.” IIS ships with some sections locked in applicationHost.config, mainly handlers, modules and the authentication sections. A web.config that tries to change them is rejected.
If the server is yours, unlock the section for that one site rather than for the whole server. Open PowerShell as Administrator and run, changing the site name and section to the ones in your error:
& "$env:windir\system32\inetsrv\appcmd.exe" unlock config "Default Web Site" -section:system.webServer/handlers -commit:apphost
For Windows or anonymous authentication, the section is system.webServer/security/authentication/windowsAuthentication or .../anonymousAuthentication. You can do the same in IIS Manager: select the site, open Configuration Editor, choose the section and click Unlock Section.
Note: on shared Plesk hosting you can’t unlock server sections. Remove the locked block from your web.config and change the setting through the domain’s pages in Plesk instead, or ask support to change it for you.
If the locked section is authentication and the error appeared after enabling it, also check the feature is installed. Windows Authentication is a separate role service under Web Server (IIS) > Security in Server Manager.
Fix 4: 0x80070005, IIS can’t read the folder
The Config Error says “Cannot read configuration file due to insufficient permissions.” IIS reads web.config as the application pool identity, and those accounts get their rights through the IIS_IUSRS group. This breaks most often after files are copied in from another machine or restored from a backup with their old permissions. Grant read access to the site’s root and let it inherit:
icacls "C:\inetpub\mysite" /grant "IIS_IUSRS:(OI)(CI)RX" /T
If the site’s content lives on a network share (a UNC path such as \\fileserver\sites), IIS can’t pass the visitor’s identity through. In the site’s Basic Settings, click Connect as and set a specific user that has read access to the share. A wrong or expired password there produces the same 500.19.
On Plesk for Windows, use Repair on the domain’s file permissions rather than icacls, because Plesk keeps its own per-site accounts. Fixing file permissions in Plesk for Windows walks through it.
Fix 5: 0x800700b7, a duplicate entry
The message looks like “Cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’ set to ‘.woff2’.” Your web.config adds something the server already defines. It happens a lot when a site moves to a newer server whose IIS already knows the file type. Remove the inherited entry first, then add yours:
<staticContent>
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
</staticContent>
The same pattern works for duplicate <add> entries in handlers, modules and defaultDocument.
Fix 6: 0x80070003 or 0x8007010b, the path doesn’t exist
IIS is pointing at a folder that was moved, renamed or never created. List each site’s physical path and check it exists:
Get-Website | ForEach-Object { "{0} -> {1} exists: {2}" -f $_.Name, $_.PhysicalPath, (Test-Path ([Environment]::ExpandEnvironmentVariables($_.PhysicalPath))) }
Fix the path in the site’s Basic Settings. Check virtual directories and applications under the site too, because each has its own path and they’re easy to miss after a folder move.
Fix 7: 0x8007007e or 0x800700c1, a bad module reference
The config names a module DLL that’s missing or the wrong bitness for the app pool. A common trigger is Enable 32-Bit Applications set to True on a pool while a module is only installed as 64-bit. Set it back to False in the pool’s Advanced Settings unless the app really needs 32-bit, or remove the reference to the module. If you can’t tell which module it is, turn on Failed Request Tracing for status code 500.19, reproduce the error, and read the trace in C:\inetpub\logs\FailedReqLogFiles.
How to prevent it
- Install modules before the config that needs them. On a new server, add URL Rewrite and the Hosting Bundle before you copy the site over.
- Keep a copy before every edit.
copy web.config web.config.baktakes a second and gives you a one-step rollback when the site goes down. - Use
<remove>before<add>for MIME types, handlers and modules, so the file works whether or not the server already defines them. - Test the XML with the PowerShell line in Fix 2 before you upload a changed file.
- Restore with permissions in mind. After restoring a site from backup, re-apply read access for IIS_IUSRS. Windows Server backup and recovery covers restoring files to their original location with their security settings.
New to IIS? Installing and configuring IIS on Windows Server sets up the role services this guide refers to. If you’d rather run Windows sites on a server where you can unlock sections and install modules yourself, our VPS plans give you full administrator access.
Frequently Asked Questions
What does HTTP Error 500.19 mean?
It means IIS found invalid configuration data for the page and stopped before running the site’s code. The Error Code on the detailed error page tells you whether the cause is bad XML, a locked section, missing permissions, a duplicate entry or a wrong path.
How do I fix error 0x8007000d in IIS?
Check the web.config XML for unclosed or misspelled tags, then check whether it uses a section for a module that isn’t installed. The usual culprits are the rewrite section, which needs the URL Rewrite module, and the aspNetCore section, which needs the ASP.NET Core Hosting Bundle.
Why can’t I see the detailed 500.19 error?
IIS shows the detailed page only to requests made on the server itself. Open the site in a browser on the server over Remote Desktop, or ask your host for the Error Code if you don’t have access.
How do I fix 0x80070021 “This configuration section cannot be used at this path”?
The section is locked in applicationHost.config. On your own server, unlock it for that site with appcmd unlock config or the Unlock Section button in Configuration Editor. On shared hosting, remove the section from web.config and set the option in the control panel instead.
Can a Windows update cause HTTP Error 500.19?
It can if an update or a .NET upgrade removes or replaces a module your web.config uses, such as the ASP.NET Core Module. Reinstall the Hosting Bundle for your .NET version and run iisreset.