LocalServiceSecuritySettings.SessionKeyRenewalInterval 属性
定义
获取或设置在安全会话中使用的密钥的生存期。Gets or sets the lifetime of a key used in a security session. 此时间间隔到期后,将自动续订密钥。When this interval expires the key is automatically renewed.
public:
property TimeSpan SessionKeyRenewalInterval { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan SessionKeyRenewalInterval { get; set; }
member this.SessionKeyRenewalInterval : TimeSpan with get, set
Public Property SessionKeyRenewalInterval As TimeSpan
属性值
时间跨度,此时间之后服务要求发起方续订用于安全会话的密钥。The time span after which the service requires that the initiator renew the key used for the security session. 如果发起方在此时间内不续订密钥,则服务将向发起方发送回错误。If the initiator does not renew the key within this time the service sends back a fault to the initiator. 默认值为15小时。The default is 15 hours.
例外
该属性已设置为小于 0 的值。The property is set to a value less than 0.
示例
此示例演示如何获取此属性的值。This example shows how get the value of this property.
TimeSpan sessionKeyRenewalInterval =
settings.SessionKeyRenewalInterval;
Dim sessionKeyRenewalInterval As TimeSpan = settings.SessionKeyRenewalInterval
注解
诸如此类的会话设置在以下任何条件下均适用:Session settings such as this one are applicable under any of the following conditions:
WSDualHttpBinding 和 NetTcpBinding 的所有客户端凭据类型。All client credential types for WSDualHttpBinding and NetTcpBinding.
如果已启用 <reliableSession> 元素,则为。If <reliableSession> element is enabled.
如果未启用 <reliableSession> 元素,则在上 WSHttpBinding 为 UserName =
true或 ClientCredentials.Windows =true。If <reliableSession> element is not enabled, on WSHttpBinding with UserName =trueor ClientCredentials.Windows =true.
诸如此类的会话设置在以下任何条件下均不适用:Session settings such as this one are not applicable under any of the following conditions:
对于 BasicHttpBinding。For BasicHttpBinding.
如果未启用 <reliableSession> 元素,则在 WSHttpBinding 带有 ClientCertificate =
true或且没有 ClientCredentials 属性设置为时true。If <reliableSession> element is not enabled, on WSHttpBinding with ClientCertificate =trueor with none of the ClientCredentials properties set totrue.