ICacheManager::get_AppUrl, put_AppUrl

Ee809904.c++_off(en-US,CS.10).gifEe809904.vb_on(en-US,CS.10).gif

The AppUrl property is a read/write string that contains the full Uniform Resource Locator (URL) of the application.

Definition

Get method:

HRESULT ICacheManager::get_AppUrl(BSTR*AppUrl);

Put method:

HRESULT ICacheManager::put_AppUrl(BSTRAppUrl);

Parameters

AppUrl

[in] When putting the property, a BSTR that contains the full URL of the application.
[out,retval] When getting the property, a pointer to a BSTR used to return the full URL of the application.

Return Values

These methods return an HRESULT indicating whether they completed successfully. See the Error Values section for more details.

Error Values

These methods return 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 default value for this property is the URL of the current Internet Information Services (IIS) 5.0 application. Depending on the URL used to access the IIS application the first time after it is started, this URL could contain the special host name "localhost," preventing it from being accessed externally. Therefore, it is best to explicitly set this property to the full URL of the IIS application.

Unlike the other properties of CacheManager object that are set on a per-cache basis, the AppUrl property is a global property. The AppUrl property is generally used to register all of the caches running in a web server farm so that they can be managed without requiring explicit registration by an administrator. The Publish Campaign module in Commerce Server Business Desk is an example of this.

If the cache object is a Dictionary object, then the value of this property is passed to the CacheLoader and CacheWriter objects during each cache refresh. It will be put in the _AppUrl key in the Dictionary object.

See Also

CacheManager Object


All rights reserved.