Skip to main content

DocumentManager.HibernationStoragePath Property

Specifies the path to the server directory to which documents are hibernated.

Namespace: DevExpress.Web.Office

Assembly: DevExpress.Web.v24.2.dll

Declaration

public static string HibernationStoragePath { get; set; }

Property Value

Type Description
String

The path to the server directory.

Remarks

When the document hibernation is enabled (the EnableHibernation property is set to true), the DocumentManager hibernates inactive open documents after an idle timeout (HibernateTimeout) has passed.

Use the HibernationStoragePath property to specify the path to the server directory where documents are hibernated.

Example

Specify the hibernation settings in the Application_Start method handler in the global.asax file. In this instance, users are not required to reload the page with the Spreadsheet control and can continue to work with the open document even after a server failure.

The following code sample demonstrates how to define the hibernation settings:

<%@ 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