Please Read: Significant Update Planned, Migrating Forum Software This Month

See more
See less

IIS 6 VBscript MetaBase editing

  • Filter
  • Time
  • Show
Clear All
new posts

  • IIS 6 VBscript MetaBase editing

    Hello everonye,

    I've ran into a problem when I tried changing the DefaultDoc property
    of a site using a script.
    The script basicaly doesn't work when one of the site's sub-directories
    or virtual directories has "Enable default content page" checked.
    If you check the value of DefaultDoc in the MetaBase on that site you will see that it has changed, but when you look at the site's properties in the IIS
    Manager the Default pages aren't changed.
    If you try and change the Default content page using the IIS Manager
    you are pormpted to replace those of the subdirectories and virtual
    directories, I believe this is why the changes fail to apply to the
    Does anyone know a work around for this issue?

    Oh, the script looks like this:

    NormalDoc = "Default.htm,Default.asp,index.htm,Default.asp x"
    Set Website = getObject("IIS://localhost/W3SVC/2")
    Website.DefaultDoc = NormalDoc

    Thanks in advance,


    EDIT: This seems to happen when you try and change the AppPoolId value as well.

  • #2
    Re: IIS 6 VBscript MetaBase editing

    I'm not sure if this is the solution but it's worth a shot.
    Try enabling direct metabase editing within IIS.
    Check the box, apply the setting then restart IIS and try it out.
    Attached Files

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **


    • #3
      Re: IIS 6 VBscript MetaBase editing

      Well, considering that the script works as long as there aren't any virtual dirs with application pools/default document settings I don't believe this is the problem.
      Furthermore, we had the guys from the IIS Product team here in Israel today and I asked them about this, Alexis Eller, one of the program managers whipped out a WMI script doing the same thing, only it works while mine fails.
      I somehow don't think it's only possible through WMI....
      Thanks for the answer though, I'll give it a try anyways tomorrow.