Skip to main content
A newer version of this page is available. .

DocumentManager.EnableHibernation Property

Gets or sets a value specifying whether the document work session hibernation is enabled or disabled. The default value is false.

Namespace: DevExpress.Web.Office

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(false)]
public static bool EnableHibernation { get; set; }

Property Value

Type Default Description
Boolean **false**

true, if hibernation is enabled; otherwise, false.

Remarks

To learn more, see the Document Hibernation.

Example

The following code example demonstrates how hibernation settings can be defined in the Application_Start method. Some of the settings are optional.

<%@ Application Language="C#" %>
<%@ Import Namespace="DevExpress.Web.Office" %>
<script runat="server">
    void Application_Start(object sender, EventArgs e) {
        // Code that runs on application startup
        DocumentManager.HibernationStoragePath = Server.MapPath("~/App_Data/HibernationStorage/"); //Required setting
        DocumentManager.HibernateTimeout = TimeSpan.FromMinutes(30); //Optional setting
        DocumentManager.HibernatedDocumentsDisposeTimeout = TimeSpan.FromDays(1); //Optional setting
        DocumentManager.HibernateAllDocumentsOnApplicationEnd = true; //Optional setting
        DocumentManager.EnableHibernation = true; //Required setting to turn the hibernation on
    }
</script>
See Also