Partager via


<signatureKeyLength> Element

Specifies the key length for DerivedKeyToken security tokens that only digitally sign SOAP messages.

<microsoft.web.services3> Element
  <security> Element
    <securityTokenManager> Element
      <add> Element for <securityTokenManager>

<signatureKeyLength value="key length" />

Attributes and Elements

Attributes

Attribute Description

value

Optional attribute. Specifies the key length, in bits, for DerivedKeyToken security tokens that are used to only digitally sign SOAP messages. The value must be a positive number that is a multiple of 8. The default value is 192.

Child Elements

None

Parent Elements

Element Description

<add> Element for <securityTokenManager>

Adds a user-supplied custom security token manager for an XML-based security token to the application domain.

Remarks

Use the <signatureKeyLength> element to specify the key length for DerivedKeyToken security tokens that are only used to digitally sign SOAP messages. To specify that a DerivedKeyToken security token is only used to digitally sign SOAP messages, use the DerivedKeyToken constructor and set the isForSigningOnly parameter to true.

Example

The following code example sets the key length for DerivedKeyToken security tokens that are only used to digitally sign SOAP messages to 256 bits.

<configuration>
  <microsoft.web.services3>
    <security> 
      <securityTokenManager> 
        <add
          type="Microsoft.Web.Services3.Security.Tokens.DerivedKeyTokenManager, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" priority="1" group="0" 
        namespace="https://schemas.xmlsoap.org/ws/2004/04/sc"
        localName"DerivedKeyToken">
          <signatureKeyLength value="256" /> 
        </add>
      </securityTokenManager>
    </security>
  </microsoft.web.services3>
</configuration>

See Also

Reference

DerivedKeyToken