AuthManager.SetProperty
Use this method to place a custom property name/value pair into the current ticket for the user.
Definition
Sub SetProperty(EnumMSCS_TicketTypeenumTicketType,propName As String,propVal As String)
Parameters
enumTicketType
[in] An EnumMSCS_TicketType that indicates the type of ticket.
propName
[in] A String that contains the name of the property.
propVal
[in] A String that contains the value corresponding to the named property.
Error Values
This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM 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 | &HC1004C23 | Invalid character (';' or '%' or '=') present in the UserID or the property name/value pair. |
E_UPM_AUTHID_INVALID_PROPERTY | &HC1004C27 | Invalid custom property name or value. |
E_UPM_AUTHMANAGER_API_ASP_ONLY | &HC1004C24 | This method should only be called within an ASP page. |
MSG_UPM_AUTH_SITE_NEEDED_ERROR | &HC1004C10 | 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. In particular, the Description property may contain a text description of the error.
Remarks
Use the GetProperty method to retrieve the custom property values from the current ticket.
The following table defines the possible values for the EnumMSCS_TicketType.
Name | Value | Description |
enumMSCS_ProfileTicketType | 1 | A MSCSProfile ticket used for an anonymous user. |
enumMSCS_AuthTicketType | 2 | A MSCSAuth ticket used for a registered user. |
Note
- A property with the name "Ticket" is used by the AuthManager object for storing Commerce Server 2000 related information. When creating a custom property, do not set the property name to "Ticket".
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Example
' oAuthManager is a Commerce AuthManager object
oAuthManager.SetProperty enumMSCS_AuthTicketType, "Password", "MyPassword123"