Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DefaultWebDocumentViewerContainer.UseFileExportedDocumentStorage(String) Method

Specifies a path for the exported document’s file storage.

Namespace: DevExpress.XtraReports.Web.WebDocumentViewer

Assembly: DevExpress.XtraReports.v24.2.Web.dll

NuGet Package: DevExpress.Web.Reporting.Common

#Declaration

public static void UseFileExportedDocumentStorage(
    string workingDirectory
)

#Parameters

Name Type Description
workingDirectory String

Specifies a path to the directory where exported documents should be stored.

#Remarks

The Document Viewer uses a cache or file storage to get the exported document in the following cases:

By default, the exported document is stored in a memory cache and removed from it the first time it is requested. You can make the Document Viewer use a file storage instead. For this purpose, use the UseFileExportedDocumentStorage method.

The following code demonstrates how to use the UseFileExportedDocumentStorage method to specify a file storage for the Document Viewer.

using DevExpress.XtraReports.Web.WebDocumentViewer;
//... 
  DefaultWebDocumentViewerContainer.UseFileExportedDocumentStorage(Server.MapPath("~/App_Data/PreviewCache"));
//...

Tip

Use the UseFileExportedDocumentStorage(String, StorageSynchronizationMode) method overload to specify the InterProcess synchronization mode for the file storage if you use Web Farms or Garden. By default, the InterThread mode is set.

The cleaner service periodically searches the cache and file storage for expired documents/exported documents/reports and deletes them. You can use the CacheCleanerSettings and StorageCleanerSettings to specify check interval and expiration time settings. To prevent expired documents from being deleted, call the UseEmptyStoragesCleaner() method to register an empty storage cleaner.

See Also