Export (0) Print
Expand All

<userNameSecurityTokenHandlerRequirement>

.NET Framework 4.5

Provides configuration for the MembershipUserNameSecurityTokenHandler class or derived classes.

<system.identityModel>
  <identityConfiguration>
    <securityTokenHandlers>
      <add> [securityTokenHandlers]
        <userNameSecurityTokenHandlerRequirement>
<system.identityModel>
  <identityConfiguration>
    <securityTokenHandlers>
      <add type="System.IdentityModel.Services.Tokens.MembershipUserNameSecurityTokenHandler, System.IdentityModel.Services">
        <userNameSecurityTokenHandlerRequirement membershipProviderName=xs:string >
        </userNameSecurityTokenHandlerRequirement>
      </add>
    </securityTokenHandlers>
  </identityConfiguration>
</system.identityModel>

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

membershipProviderName

Specifies the MembershipProvider that should be used by the security token handler.

Child Elements

None

Parent Elements

Element

Description

<add> [securityTokenHandlers]

Adds the specified security token handler to the token handler collection.

The <userNameSecurityTokenHandlerRequirement> element sets the MembershipProvider property when a MembershipUserNameSecurityTokenHandler object is initialized from configuration.

    <add type="System.IdentityModel.Services.Tokens.MembershipUserNameSecurityTokenHandler, System.IdentityModel.Services">
        <userNameSecurityTokenHandlerRequirement membershipProviderName="AspNetSqlProvider/>
    </add>
Show:
© 2014 Microsoft