IMSCSAuthManager::SetProfileTicket
Use this method to set a MSCSProfile ticket for an anonymous user. An anonymous user is not registered with a site.
Definition
HRESULT IMSCSAuthManager::SetProfileTicket(BSTRUserID,VARIANT_BOOLfCookieSupport);
Parameters
UserID
[in] A BSTR that contains the unique ID for the current user.
fCookieSupport
[in] A VARIANT_BOOL that indicates whether persistent cookies are supported.
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 either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.
The following table shows the custom COM errors that this method can return.
Constant | Value | Description |
E_UPM_AUTHID_INVALID_CHARACTER_PRESENT | 0xC1004C23 | Invalid character (';' or '%' or '=') present in the UserID or the property name/value pair. |
E_UPM_AUTHMANAGER_API_ASP_ONLY | 0xC1004C24 | This method should only be called within an ASP page. |
MSG_UPM_AUTH_SITE_NEEDED_ERROR | 0xC1004C10 | The Initialize method must be called with the installed site name before calling this method. |
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
If an MSCSProfile ticket for the user already exists and an empty string is passed in for the user ID, UserID, the existing ticket is deleted.
If the current user has registered, use the SetAuthTicket method to generate an MSCSAuth ticket.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.