ServiceBehaviorAttribute.AutomaticSessionShutdown Property

Definition

指定是否要在用戶端關閉輸出工作階段時,自動關閉工作階段。Specifies whether to automatically close a session when a client closes an output session.

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

Property Value

Boolean

如果服務會在用戶端關閉輸出工作階段時自動關閉工作階段,則為 true,否則為 falsetrue if services automatically close a session when the client closes an output session; otherwise, false. 預設值為 trueThe default is true.

Remarks

根據預設,當用戶端關閉輸出工作階段,且服務已完成處理任何剩餘的訊息時,伺服器便會關閉工作階段。By default when a client closes an output session and the service has finished processing any remaining messages the server closes the session. AutomaticSessionShutdown 設定為 false,以防止伺服器自動關閉工作階段,並啟用工作階段存留期的自訂控制。Setting AutomaticSessionShutdown to false prevents the server from automatically closing the session and enables custom control of session lifetimes.

Applies to