Share via


LocalServiceSecuritySettings.IssuedCookieLifetime 属性

定义

获取或设置服务颁发给客户端的 SecurityContextSecurityToken 的生存期。

public:
 property TimeSpan IssuedCookieLifetime { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan IssuedCookieLifetime { get; set; }
member this.IssuedCookieLifetime : TimeSpan with get, set
Public Property IssuedCookieLifetime As TimeSpan

属性值

一个 TimeSpan,表示新安全 Cookie 的生存期。 默认值为 10 小时。

例外

该属性已设置为小于 0 的值。

示例

此示例演示如何获取 IssuedCookieLifetime 值。

TimeSpan issuedCookieLifetime = settings.IssuedCookieLifetime;
Dim issuedCookieLifetime As TimeSpan = settings.IssuedCookieLifetime

注解

服务向客户端颁发安全对话 Cookie 令牌时,此属性的值决定这些令牌的有效期。

适用于