Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MembershipProvider Property

UserNamePasswordServiceCredential.MembershipProvider Property

Gets or sets the membership provider.

Namespace:  System.ServiceModel.Security
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public MembershipProvider MembershipProvider { get; set; }

Property Value

Type: System.Web.Security.MembershipProvider
The MembershipProvider for this service. The default is the SqlMembershipProvider.


An attempt is made to set this property when the credential is read-only.

For MembershipProvider mode, the service uses MembershipProvider for user name/password authentication by calling the ValidateUser method.


The UserNamePasswordValidationMode property must be set to MembershipProvider for the MembershipProvider to take effect. When the MembershipProvider property is set and the UserNamePasswordValidationMode property is not, WCF uses Windows authentication and ignores the value of the MembershipProvider property.

If the UserNamePasswordValidationMode property is set to MembershipProvider and the MembershipProvider property is not set to a value, the default is the SqlMembershipProvider class.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft