AuthManager.Initialize

Ee825221.c++_on(en-US,CS.10).gifEe825221.vb_off(en-US,CS.10).gif

Use this method to initialize the AuthManager object.

Definition

Sub Initialize(bstrSiteName As String)

Parameters

bstrSiteName

[in] A String that contains the name of the Commerce Server 2000 Web site.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

The AuthManager object must be properly initialized to a valid site name immediately after creating the object and before any other AuthManager object method is used.

The first time any AuthManager object uses this method, it connects to the Administration database and caches the site configuration data using the SiteConfig object. When subsequent AuthManager objects call this method the data is read from the cache.

Use the Refresh method to update the site configuration data after any of the properties have been changed.

Use the UnInitialize method to delete the site-specific configuration resource properties from the cache when the site is no longer valid.

It is suggested to instantiate and initialize the AuthManager object in the Global.asa file to make sure at least one instance of the object exists, and to ensure the dynamic-link library (DLL) is loaded in memory and not flushed out by Internet Information Services (IIS) for performance reasons. This AuthManager object should not be used elsewhere. A separate instance of the AuthManager object must be created and destroyed on each ASP page.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

See Also

AuthManager Object


All rights reserved.