ClientWindowsAuthenticationMembershipProvider Class
Enables Windows authentication with client application services.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
System.Configuration.Provider::ProviderBase
System.Web.Security::MembershipProvider
System.Web.ClientServices.Providers::ClientWindowsAuthenticationMembershipProvider
| Name | Description | |
|---|---|---|
![]() | ClientWindowsAuthenticationMembershipProvider() | Initializes a new instance of the ClientWindowsAuthenticationMembershipProvider class. |
| Name | Description | |
|---|---|---|
![]() | ApplicationName | This property is not used by this class.(Overrides MembershipProvider::ApplicationName.) |
![]() | Description | Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).(Inherited from ProviderBase.) |
![]() | EnablePasswordReset | This property is not used by this class.(Overrides MembershipProvider::EnablePasswordReset.) |
![]() | EnablePasswordRetrieval | This property is not used by this class.(Overrides MembershipProvider::EnablePasswordRetrieval.) |
![]() | MaxInvalidPasswordAttempts | This property is not used by this class.(Overrides MembershipProvider::MaxInvalidPasswordAttempts.) |
![]() | MinRequiredNonAlphanumericCharacters | This property is not used by this class.(Overrides MembershipProvider::MinRequiredNonAlphanumericCharacters.) |
![]() | MinRequiredPasswordLength | This property is not used by this class.(Overrides MembershipProvider::MinRequiredPasswordLength.) |
![]() | Name | Gets the friendly name used to refer to the provider during configuration.(Inherited from ProviderBase.) |
![]() | PasswordAttemptWindow | This property is not used by this class.(Overrides MembershipProvider::PasswordAttemptWindow.) |
![]() | PasswordFormat | This property is not used by this class.(Overrides MembershipProvider::PasswordFormat.) |
![]() | PasswordStrengthRegularExpression | This property is not used by this class.(Overrides MembershipProvider::PasswordStrengthRegularExpression.) |
![]() | RequiresQuestionAndAnswer | This property is not used by this class.(Overrides MembershipProvider::RequiresQuestionAndAnswer.) |
![]() | RequiresUniqueEmail | This property is not used by this class.(Overrides MembershipProvider::RequiresUniqueEmail.) |
| Name | Description | |
|---|---|---|
![]() | ValidatingPassword | Occurs when a user is created, a password is changed, or a password is reset.(Inherited from MembershipProvider.) |
You can use client application services to validate users by using Windows authentication. To enable Windows authentication, you configure your application to use the ClientWindowsAuthenticationMembershipProvider class. For more information, see How to: Configure Client Application Services.
After configuration, you can validate users by calling the static Membership::ValidateUser method. The Membership::ValidateUser method internally calls the ValidateUser method.
The ClientWindowsAuthenticationMembershipProvider::ValidateUser method automatically authenticates the current user and sets the static Thread::CurrentPrincipal property to a ClientRolePrincipal object that contains the current WindowsIdentity. If a ClientRoleProvider is configured for your application, you can use the ClientRolePrincipal object to retrieve user role information from the roles service.
You can retrieve a reference to the current ClientWindowsAuthenticationMembershipProvider instance through the static Membership::Provider property. You can use the membership provider reference to call the ClientWindowsAuthenticationMembershipProvider::ValidateUser method directly. Additionally, you will need the membership provider reference to call the Logout method, which is not available in the MembershipProvider base class.
The following example code demonstrates how to use this method to authenticate a user by using Windows authentication. In this example, the value of the static Membership::Provider property is cast to a ClientWindowsAuthenticationMembershipProvider instance. This makes sure that a NullReferenceException will be thrown if you accidentally test this code by using another membership provider.
Available since 3.5
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Membership::ValidateUser
ClientWindowsAuthenticationMembershipProvider::ValidateUser
Thread::CurrentPrincipal
ClientRolePrincipal
WindowsIdentity
ClientRoleProvider
Membership::Provider
Logout
System.Web.ClientServices.Providers Namespace
Client Application Services
How to: Configure Client Application Services



