title: How to use appcmd to set debug=false in IIS7
body: <p>I'm trying to use <code>APPCMD</code> to set <code>debug=false</code> in <code>web.config</code>, per the <a href="http://technet.microsoft.com/en-us/library/cc725812(WS.10).aspx" rel="nofollow noreferrer">documentation</a>. </p>
  
  <p>The specific syntax I am using is: </p>
  
  <blockquote>
    <p><code>APPCMD SET CONFIG "SITE/VDIR" section:compilation /debug:False /commit:APP</code></p>
  </blockquote>
  
  <p>the output is </p>
  
  <p><code>INFO ( section:compilation, timetaken:219, hresult:00000000, objects:1 )
  Applied configuration changes to section "system.web/compilation" for "MACHINE/W
  EBROOT/APPHOST/SITE/VDIR" at configuration commit path "MACHINE/WE
  BROOT/APPHOST/SITE/VDIR"</code></p>
  
  <p>Afterwards, <code>debug</code> still is set to <code>true</code>.</p>
  
  <p>I have ruled out the file being read only; I have used process monitor to watch appcmd actually write to web.config in the correct location.  My environment is Windows 2008 x64, SP2.</p>
  
  <p>I understand that there are many different ways to solve the problem; different config files, doing it myself in xpath, nant, etc, but I'm specifically interested in why <code>APPCMD</code> does not seem to be working, and to help others who may also be struggling with the tool. Thanks for your help!</p>