Interface IADs

The UserObjects class implements the IADs interface in a slightly difference way than a bona file ADSI object.  The properties and methods below can be used to access the user's ADSI object as defined by the default AUO entry only.  It therefore can be said that to a client application, the UserObjects object contains the IADs interface on the user's ADSI object as it is defined for the default AUO entry.  However, using the interface on the UserObjects object has some extra advantages:

  1. If configured to do so, the various "Get/GetEx" methods first check the Membership server instance cache for the properties before forwarding the call to the actual ADSI object.  This can increase performance tremendously.

  2. The IADs interface exposed on the UserObjects class can be used immediately to interact with the ADSI object defined for the user in the default AUO entry.  No extra call to GetObject or GetObjectEx is required.

Properties

Property Description
Name Gets the object’s relative name as it appears in the underlying directory service.
Class Gets the object's schema class name.
GUID Gets the object's globally unique identifier.
ADsPath Gets the object's ADsPath.  This path uniquely identifies the object from all others.
Parent Gets the ADsPath to the object that contains this object. (its parent object)
Schema Gets the ADsPath to the object that defines the schema for this object.

Methods

Method Description
GetInfo Loads or reloads the data from the directory service into the ADSI object.  This method is implicitly called if a call to Get is encountered before Getinfo.
GetInfoEx Loads or reloads specific properties from the directory service database into the ADSI object.
SetInfo Commits the data in the ADSI object to the directory service database.
Get Gets the value or values of the property specified by name.  The method will first check the Membership Server instance property cache if configured to do so.
GetEx Gets the value of the property specified by name.  The method will check the Membership Server instance cache is configured to do so.
Put Sets the value for the property specified
PutEx Sets the value for the property specified

Remarks

The properties stored in the ADSI object can be accessed through IDispatch interfaces on ADSI objects using a special syntax.  This syntax is also referred to as "direct syntax."  In this case, one can refer to the property names as if they were real properties of the ADSI object.

<%
Set IUserObjects = Server.CreateObject("Membership.UserObjects
name = IUserObjects.GivenName
%>

The other way to access this property would be through the Get method as shown below.

<%
    Set IUserObjects = Server.CreateObject("Membership.UserObjects")
    name = IUserObjects.Get "givenName"
 %>

Note that objects of class UserObjects as well as ADSI objects support this syntax.


© 1997-1998 Microsoft Corporation. All rights reserved.