You can use the IIsWebVirtualDir object to set metabase properties that apply to one or all virtual directories for a Web site. If you use the IIsWebVirtualDir object at the server's ROOT directory (.../W3SVC/2/ROOT), inheritable property values will apply to all virtual subdirectories. You can set properties for a specific virtual directory by using the IIsWebVirtualDir object for a specific virtual directory (.../W3SVC/2/ROOT/AVdir).
You can also use IIsWebVirtualDir methods to create and manage Web applications in Web virtual directories and virtual subdirectories. Applications can also be defined and managed in Web directories. See IIsWebDirectory.
The IIsWebVirtualDir object is an ADSI container object.
For the server's root virtual directory,
where MachineName can be any name or "LocalHost."
For a specific virtual directory,
where MachineName can be any name or "LocalHost."
varReturn = object.Method
IIsWebVirtualDir | IIsWebFile |
IIsWebDirectory |
ADSI Object Properties |
Metabase Properties
AppCreate | Creates an application at a specified metabase key (parameter is a Boolean). |
AppCreate2 | Creates an application at a specified metabase key (parameter is a Long). |
AppDelete | Deletes an application definition at a specified key. |
AppDeleteRecursive | Deletes application definitions at a specified key and its subkeys. |
AppDisable | Disables an application at a specified key. |
AppDisableRecursive | Disables applications at a specified key and its subkeys. |
AppEnable | Enables an application that was previously disabled at a specified key. |
AppEnableRecursive | Enables applications that were previously disabled at a specified key and its subkeys. |
AppGetStatus | Retrieves the status of an application. |
AppUnload | Unloads an application at a specified key. |
AppUnloadRecursive | Unloads applications at a specified key and its subkeys. |
AspAppRestart | This method restarts the ASP application that invoked it. |
ADSI Object Methods | Standard methods for ADSI objects. |
ADSI Container Object Methods | Standard methods for ADSI container objects. |