Skip to end of metadata
Go to start of metadata

While installing Agents4 for IIS on a Windows 2012 Server R2, I experienced an error which has held me up for a couple of days.  It may be worth adding my experience to the documentation we give to customers.

Part of the couple of days was given over to getting the installer to actually tell me why it wasn't installing (previously it didn't even report a problem and seemed to have succeeded).  This particular problem now manifests itself (with the revised installer) as:

Validating... Success.
Cleaning up validation data..
Creating configuration...
AddElement failed, file MACHINE/WEBROOT/APPHOST/SITE1: The process cannot access the file because another process has locked a portion of the file.

This is fixed by starting up IIS Manager and selecting the Configuration Editor under the Management section:

When the Configuration Editor is open, there is a drop down towards the top of the screen:

Every single one of the items in the drop down list must be visited and and "Unlock Section" clicked:

Fortunately this isn't quite as tedious as it sounds.  When the drop down box is selected, pressing the down arrow key is sufficient to select the next item in the list.  When all elements have been visited and all sections of the file are unlocked, the installation can be attempted again.

  • No labels


  1. Unknown User (dcutler)

    I ran into this as well.  Is it possible to know exactly which of the various config items required unlocking?  I'm a bit concerned of randomly unlocking the myriad of items when it may be that only 1 or 2 really needed to be unlocked for the agent to install correctly.  It might also turn out to be that randomly unlocking these items may impose a security issue.  Any thoughts?  Thanks!

    1. You could unlock sections one by one, restart and check if it had done the trick.  Were I a more patient man, I would have done this.  As I was just dealing with my local VM, I knew I didn't have to be that concerned.  Certainly if I were dealing with a production box I would have proceeded with a little more care.  If after unlocking one section and restarting, the situation was the same, I'd have been tempted to relock it before moving on to the next section.

  2. Unknown User (nikolaosinlight)

    I ran into this issue as well.  The good news is that I unlocked only about 5 modules and they were all under:


    Since I used the quick technique of pressing the down key mentioned by Tony (which is really useful BTW when lots of these things need to be unlocked) I didn't really see the configuration sections that were upcoming but after I hit these 2 I assumed I unlocked what was necessary for Agent to complete it's install:


    And indeed it worked.

    Lastly, since the Agent installs itself as an IIS Module I have a strong suspicion that the only one needed to be unlocked may very well be the IIS Module configuration:

  3. Unknown User (nikolaosinlight)

    Just rebuild my VM again from scratch and the only file that needs to be unlocked is: