Sdílet prostřednictvím


<remove>

Removes the specified security token handler from the token handler collection.

<configuration>
  <system.identityModel>
    <identityConfiguration>
      <securityTokenHandlers>
        <remove>

Syntax

<system.identityModel>  
  <identityConfiguration>  
    <securityTokenHandlers>  
      <remove type=xs:string >  
      </remove>  
    </securityTokenHandlers>  
  </identityConfiguration>  
</system.identityModel>  

Attributes and Elements

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

Attributes

Attribute Description
type The CLR type name of the token handler to be removed. For more information about how to specify the type attribute, see Custom Type References. Required.

Child Elements

None

Parent Elements

Element Description
<securityTokenHandlers> Specifies a collection of security token handlers that are registered with the endpoint.

Example

The following XML shows the use of the <add> and <remove> elements to replace the default session token handler with a custom session token handler. The XML is taken from the ClaimsAwareWebFarm sample.

<securityTokenHandlers>  
  <remove type="System.IdentityModel.Tokens.SessionSecurityTokenHandler, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />  
  <add type="System.IdentityModel.Services.Tokens.MachineKeySessionSecurityTokenHandler, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />  
</securityTokenHandlers>