Using Vista...

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?

2 Answers 2


You're right that that isn't the expected behavior. Either ADSI or IIS Manager's settings should apply immediately and be seen by the other.

Try looking at metabase.xml directly to see if you can tell what happening. It may be some inheritance confusion.

metabase.xml is located at c:\windows\system32\inetsrv\metabase.xml.

If you want to edit metabase.xml with a text editor, make sure to turn on the metabase direct edit (safe to do so) from IIS Manager -> top level properties.


I just answered a similar question over on Stack Overflow which I hope explains why this happens:

ADSI Query against IIS does not agree with IIS Manager, on Vista (Answer)

  • Heh - just noticed it's also by Cheeso :)
    – Kev
    Feb 3, 2010 at 3:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .