共用方式為


Adding Custom Methods to an ADSI Extension for IIS

You can add a custom method, or function, to the IIS ADSI programming model in the form of an ADSI extension. With the extension model, developers can give more dynamic meaning to an object by implementing a function in a custom extension, and then binding the extension to the class object they want to extend. An ADSI extension is a special COM object that provides a way for developers to extend an ADSI object. Each extension is associated with a specified class in the directory. In a traditional directory/programming model, objects are accessed by setting and getting properties or attributes.

An extension writer implements a method that provides additional behavior not initially supplied by the IIS ADSI provider. Say, for example, a company that backs up and restores software wants to extend an ADSI object by creating two methods, called BackUp and Restore. These methods operate remotely on the physical computer pointed to by the ADSI object. By participating as an extension, the methods automatically gain access to the ADSI infrastructure, and are viewed by ADSI clients as an integral part of the IIS ADSI provider.

This section includes the following topics: