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.services2> Element
  <security> Element
    <securityTokenManager> Element

<generationLimit>The maximum position</generationLimit>

Attributes and Elements

Attributes

None

Child Elements

None

Parent Elements

Element Description

<securityTokenManager> Element

Specifies a user supplied custom security token manager for an XML-based security token.

Text Value

The text value can be any integer greater than 0. The default value is 64. A text value is required.

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.services2>
    <security> 
      <securityTokenManager 
        type="Microsoft.Web.Services2.Security.Tokens.DerivedKeyTokenManager, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" priority="1" group="0" 
        xmlns:wsc="https://schemas.xmlsoap.org/ws/2004/04/sc"
        qname="wsc:DerivedKeyToken">
        <generationLimit>96</generationLimit> 
      </securityTokenManager>
    </security>
  </microsoft.web.services2>
</configuration>

See Also

Reference

DerivedKeyToken
<securityTokenManager> Element