Share via


IMSCSAuthManager::Initialize

Ee810449.c++_off(en-US,CS.10).gifEe810449.vb_on(en-US,CS.10).gif

Use this method to initialize the AuthManager object.

Definition

HRESULT IMSCSAuthManager::Initialize(BSTRbstrSiteName,);

Parameters

bstrSiteName

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

Return Values

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT 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, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return 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.