ReportViewer.KeepSessionAlive Property

 

Gets or sets a Boolean value that indicates whether to keep the report server session from expiring as long as ReportViewer is running.

Namespace:   Microsoft.Reporting.WinForms
Assembly:  Microsoft.ReportViewer.WinForms (in Microsoft.ReportViewer.WinForms.dll)

Syntax

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

Property Value

Type: System.Boolean

true to keep the report server session from expiring; otherwise false. The default is true.

Remarks

In remote processing mode, setting this property to true causes the ReportViewer control to keep the report server session from expiring. The ReportViewer control pings the report server to keep the report server session from expiring. If you want to keep a report server session active for a user even when there is no activity on their part, set KeepSessionAlive to true. To let the session timeout and expire in your application, set KeepSessionAlive to false.

In local processing mode, setting this property has no effect.

If KeepSessionAlive is set to false and the report server session has already been created, you cannot set this property to true. Doing so will cause an InvalidOperationException to be thrown.

See Also

ReportViewer Class
Microsoft.Reporting.WinForms Namespace

Return to top