Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AuthenticatingEventArgs::CustomCredential Property

 

Gets additional user values for authentication.

Namespace:   System.Web.ApplicationServices
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

public:
property String^ CustomCredential {
	String^ get();
}

Property Value

Type: System::String^

The 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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5
Return to top
Show:
© 2017 Microsoft