AuthenticatingEventArgs::CustomCredential Property
Gets additional user values for authentication.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Property Value
Type: System::StringThe values required for authentication other than user name and password.
You can use the CustomCredential property to retrieve authentication values other than user name and password during the Authenticating event. For example, an application might be configured to validate an identification number together with the user name and password. In that case, the identification number will be passed in the CustomCredential parameter of the Login method. You can then retrieve the custom value through the CustomCredential property.
The CustomCredential property contains the customized values in the same format as they are passed to the Login method. In the Authenticating event handler, if more than one value is stored in the property, you must parse the value of the CustomCredential property to retrieve the values.
The following example shows an event handler for the Authenticating event that parses two authentication values from the CustomCredential property. It passes the two values and the user name and password to a custom authentication class named StudentAuthentication.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.