500.19 error with IIS7.5


I am getting the following error, even after I unlock my website. Any reasons?

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

Module         CustomErrorModule
Notification   SendResponse
Handler        StaticFile
Error Code     0x80070021
Config Error   Lock violation
Config File    \\?\C:\Web\En\web.config

<validation validateIntegratedModeConfiguration="false"/>
<httpErrors errorMode="DetailedLocalOnly" defaultPath="/Oops.aspx" defaultResponseMode="ExecuteURL">

I have done the following in applicationHost.config

<location path="mysite.net" overrideMode="Allow">
        <handlers />
        <httpErrors />
asked on Stack Overflow Jun 17, 2011 by tom • edited Nov 18, 2015 by pnuts

6 Answers


I had a similar Lock violation error due to defaultPath. The following fixed it for me:

The only thing that it works is to go and remove manually "defaultPath" from "lockAttributes" attribute of xml node in the file %windir%\System32\inetsrv\config\applicationHost.config

You'll have to decide for yourself whether editing applicationHost.config is too dirty.

answered on Stack Overflow May 4, 2012 by Ben Challenor

I edited the applicationHost.config but was still getting the error.

Completely forgot that after you edit applicationHost.config, you have to restart IIS.

answered on Stack Overflow May 5, 2013 by frattaro

As per my answer to this similar issue;

Try unlocking the relevant IIS configuration settings at server level, as follows:

  1. Open IIS Manager
  2. Select the server in the Connections pane
  3. Open Configuration Editor in the main pane
  4. In the Sections drop down, select the section to unlock, e.g. system.webServer > defaultPath
  5. Click Unlock Attribute in the right pane
  6. Repeat for any other settings which you need to unlock
  7. Restart IIS (optional) - Select the server in the Conncetions pane, click Restart in the Actions pane
answered on Stack Overflow Sep 6, 2014 by Chris • edited May 23, 2017 by Community

I encountered this before and it had something to do with a security setup. Check the web application folder permissions and make sure the following users and groups are included "ASPNET", "IIS_IUSRS", "IUSR".

Don't know if this will work for you or not, but worth a try I suppose.

answered on Stack Overflow Jun 17, 2011 by Marlon

I solved problem by doing this:

  1. Click "Start button"
  2. In the search box, enter "Turn windows features on or off"
  3. In the features window, Click: "Internet Information Services"
  4. Click: "World Wide Web Services"
  5. Click: "Application Development Features"
  6. Check (enable) the features. I checked all but CGI.
answered on Stack Overflow Apr 11, 2019 by Berdin Ege Turgut • edited Apr 11, 2019 by JJJ

I got this message after sharing my folder with a coworker. The folder had a lock on it (in Windows explorer). I had to release the lock (by granting a permission to all authenticated users, for further instructions view https://www.howtogeek.com/howto/17117/remove-the-lock-icon-from-a-folder-in-windows-7/). Once the lock has been removed, the error disappeared.

answered on Stack Overflow Jul 17, 2018 by Oranit Dar

User contributions licensed under CC BY-SA 3.0