title: ADSI Query against IIS does not agree with IIS Manager, on Vista
body: <p>Using Vista...   </p>
  
  <p>I have a script that uses ADSI to set ScriptMaps on an IIS Website. It's javascript, run within cscript.exe, and the code looks something like this: </p>
  
  <pre><code>var web = GetObject("IIS://localhost/W3SVC/1");
  var maps = web.ScriptMaps.toArray();
  map[maps.length] = ".aaa,c:\\path\\to\\isapi\\extension.dll,1,GET,POST";
  web.ScriptMaps = maps.asDictionary();
  web.SetInfo();
  </code></pre>
  
  <p>When I look in the IIS Manager after running the script, I can see the new entry in the list of Handler Mappings.  It has a weird name "AboMapperCustom-43155", which I understand comes from the IIS7 compatibility layer for ADSI.   </p>
  
  <p>If, in IIS Manager, I then remove those Handler Mappings, then run another ADSI script to query the ScriptMaps property, the retrieved ScriptMaps in the script still lists the entry that was just removed.  The results in the ADSI script don't agree with the list of "Handler Mappings" shown in the IIS Manager.  </p>
  
  <p>This persists even after a start/stop of IISADMIN and W3SVC. </p>
  
  <p>Is this expected behavior?  ADSI is supported as a "compatibility mode" in IIS7.  Is this an artifact of that?  </p>
  
  <p>I believe that if the Handler Mapping is removed from IIS MAnager, then it is really gone, even though it still gets returned from an ADSI query. </p>
  
  <p><strong><em>Can anyone offer any clarification on this?</em></strong></p>