Share via


<generationLimit> Element

For DerivedKeyToken security tokens, specifies the maximum position at which the derived key is located in the byte stream generated by the derived key generator.

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

<generationLimit value="Maximum position" />

Attributes and Elements

Attributes

Attribute Description

value

Specifies the maximum position at which the derived key is located in the byte stream generated by the derived key generator. The value can be any integer greater than 0. The default value is 64.

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

When a key is generated for a DerivedKeyToken security token, an array of bytes is generated based on the key of the parent security token. That array of bytes is not the key itself, but rather the set of bytes from which the key is extracted. The key is extracted from the array of bytes starting at a position specified by either the Generation or Offset properties.

When the Offset property is greater than zero, then the derived key is offset from the beginning of the byte stream by the value of the Offset property, in bytes. Otherwise, the derived key is offset by the value of the Generation property multiplied by the value of the Length property.

The <offsetLimit> Element and <generationLimit> Element elements specify the upper bounds for the Offset and Generation properties, respectively.

Example

The following code example sets the upper bound for the position at which the derived key is extracted from a generated set of bytes to 96.

<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">
          <generationLimit value="96" /> 
        </add>
      </securityTokenManager>
    </security>
  </microsoft.web.services3>
</configuration>

See Also

Reference

DerivedKeyToken
<securityTokenManager> Element