SetCredentials(unsigned int, string, object[]) Method
The SetCredentials method of the Credentials class sets the credentials for the enterprise application definition.
Parameters
ui32Flags Reserved for internal use.
strApplicationName The name of the enterprise application definition. The maximum allowed number of characters is 128.
Args Array of ****strings that contains the credentials. The SetCredentials method uses only the first five string parameters in the Args parameter for the credentials. The order of the credentials in the Args array determines the order in which the credentials are stored and retrieved. There is a size limit on each credential string. Each credential string can contain a maximum number of 8000 characters.
Exceptions
Exception Type | Condition |
---|---|
SingleSignonException | Method has failed or credential size limit exceeded |
Remarks
All users can use the SetCredentials method. The SetCredentials method is audited with a result of success or failure and the user that called the method in the single sign-on database. The ServiceAction enumeration recorded is SetCredentials.
Example
The following code example shows how to use the SetCredentials method.
Requirements
Platforms: Microsoft Windows Server 2003
Security: Code Access Security