title: Getting IIS 7 Site properties
body: <p>I have a C++ application that needs to retrieve an IIS 7 site's properties (such as metabase properties similar to those in IIS6 - <code>Path</code>, <code>AppFriendlyName</code> etc).</p>
  
  <p>With IIS 7, my code does this:  </p>
  
  <ol>
  <li>Get the <code>AppHostWritableAdminManager</code> and commit the path <code>MACHINE/WEBROOT/APPHOST/Default Web Site/</code>. </li>
  <li>Call <code>GetAdminSection</code> with the section name <code>appSettings</code>.  </li>
  <li>Then look at the returned collection and look for the property (<code>Path</code> for example).  </li>
  </ol>
  
  <p>This works in IIS 6 but not on IIS7/7.5. </p>
  
  <p>What changes do I need to make in order to make this work?</p>