IIS 10 Error 500.19 (0x80070021) - Lock Violation


I have an application I am trying to migrate from Server 2012 IIS 8 to Server 2016 IIS 10. When I initially move everything over I am receiving the attached error message.

I have read through several stack exchange posts and it basically says the section needs to be unlocked. I have unlocked the section via the command prompt command and via the IIS manager.

The section shows unlocked

enter image description here

enter image description here

asked on Stack Overflow Jul 18, 2019 by Josh

1 Answer


This issue happens only with Modules which are listed as Native. To resolve this error you need to unlock this module from the server level.

  • Open PowerShell as administrator and run this command.

Remove-WebConfigurationLock -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/modules/add[@name='WindowsAuthenticationModule']"

  • After unlocking this restart the iis server and try to access the site again.

You can directly unlock this setting using iis manager GUI option.

  • Select server name from the iis server node and then select module from feature view. enter image description here in modules feature, select which module you want to unlock and then right-click on it and select unlock. enter image description here

and then restart iis server.

answered on Stack Overflow Jul 19, 2019 by Jalpa Panchal

User contributions licensed under CC BY-SA 3.0