This documentation is archived and is not being maintained.

AuthenticatingEventArgs::Authenticated Property

Gets or sets a value that indicates whether the user credentials are valid.

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

public:
property bool Authenticated {
	bool get ();
	void set (bool value);
}

Property Value

Type: System::Boolean
true if the user credentials are valid; otherwise, false.

If you authenticate user credentials in an event handler for the Authenticating event, set the Authenticated property to indicate whether the user credentials are valid. If the user credentials are valid and no additional validation is needed, set Authenticated to true and AuthenticationIsComplete to true. You set the AuthenticationIsComplete property to indicate that the authentication service should bypass the default steps for authenticating a user. The value in Authenticated is used by the AuthenticationService class only if AuthenticationIsComplete is set to true. If AuthenticationIsComplete is false, the AuthenticationService class calls the default membership provider to validate user credentials, and then overwrites the value in Authenticated.

The following example shows an event handler that passes UserName and Password values to a custom membership provider to validate the user credentials. The event handler sets Authenticated to the return value of the ValidateUser method and sets AuthenticationIsComplete to true so that the AuthenticationService class does not validate the credentials.

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

.NET Framework

Supported in: 4, 3.5

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: