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

'Declaration
<DefaultValueAttribute(True)> _
Public Property KeepSessionAlive As Boolean
'Usage
Dim instance As ReportViewer
Dim value As Boolean

value = instance.KeepSessionAlive

instance.KeepSessionAlive = value
[DefaultValueAttribute(true)] 
public bool KeepSessionAlive { get; set; }
[DefaultValueAttribute(true)] 
public:
property bool KeepSessionAlive {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_KeepSessionAlive ()

/** @property */
public void set_KeepSessionAlive (boolean value)
public function get KeepSessionAlive () : boolean

public function set KeepSessionAlive (value : boolean)

Property Value

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

Reference

ReportViewer Class
ReportViewer Members
Microsoft.Reporting.WinForms Namespace