I have a script that uses ADSI to set ScriptMaps on an IIS Website. When I look in the IIS Manager after running the script, I can see the Handler Mapping that I've added.
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 removed extension. In other words, the results in the ADSI script don't agree with the list of "Handler Mappings" shown in the IIS Manager.
This happens even if I start/stop IISADMIN and W3SVC.
Is this expected behavior? I think ADSI is supported as a "compatibility mode" in IIS7.
I believe that if the Handler Mapping is removed via IIS Manager, and the IIS Manager UI indicates that it is gone, then it is really gone, even though it still gets returned from an ADSI query.
Can anyone offer any clarification on this?