Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

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.

share|improve this answer
    
Scott - my answer on Stack Overflow might shed some light: stackoverflow.com/questions/1806820/… –  Kev Feb 3 '10 at 2:38

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)

share|improve this answer
    
Heh - just noticed it's also by Cheeso :) –  Kev Feb 3 '10 at 3:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.