Share via


Schema Management

The Schema Management Objects support interfaces that are used to browse and modify the schema of a namespace. By using the Schema Management Objects together, you can create a new property that can be set at a virtual directory. For example, if you have a custom ISAPI extension, and you want to be able to configure it at each virtual directory in your Web site, you can define new properties that can be set at the virtual directory level. Editing the IIS ADSI Schema requires write access to the Schema container and its contents. By default, this capability is limited to members of the Administrators group on the local machine.

The Schema Management Objects are:

  • Schema: The container object that contains a given schema.
  • Class: An object that defines a schema object class.
  • Property: An object that describes a property.

The Schema container object contains the IIS ADSI Schema Class object.

The IIS ADSI Schema Class object defines a class of objects that can be created in the IIS namespace, such as IISWebServer and IISComputer. The Class object supports the mandatory interface IADs, as well as the IADsClass COM interface. A given IIS ADSI Schema Class object contains a list of the property names it contains in the OptionalProperties list.

note Note Although some ADSI providers require class objects to maintain a MandatoryProperties list, the IIS ADSI provider does not require mandatory properties. Therefore, all properties are optional, and you must provide any additional required properties by adding them to the OptionalProperties list.

You can update the IIS ADSI Schema using a script or program. The schema is stored in the Schema, Class, and Property objects in the IIS metabase. You can write simple scripts that call ADSI methods to extend the IIS ADSI Schema. For a look at some sample code, see How to Extend the IIS ADSI Schema.

note Note It is also possible to use other programming languages that support COM and Automation, such as C, C++, or Java, to write scripts or programs to extend the IIS ADSI Schema.