xtrareports-devexpress-dot-xtrareports-dot-web-dot-webdocumentviewer-dot-defaultwebdocumentviewercontainer-123c1acc.md
Replaces a service that is used to clean the report and document storage with an empty service, avoiding automatic cleaning of this storage.
Namespace : DevExpress.XtraReports.Web.WebDocumentViewer
Assembly : DevExpress.XtraReports.v25.2.Web.dll
NuGet Package : DevExpress.Web.Reporting.Common
public static void UseEmptyStoragesCleaner()
Public Shared Sub UseEmptyStoragesCleaner
According to the time settings specified in the CacheCleanerSettings and StorageCleanerSettings classes, the default cleaner service periodically checks if the cache and file storage (FileReportStorage, FileDocumentStorage and FileExportedDocumentStorage) contain reports/documents/exported documents whose lifetime exceeds a specific amount of time. If such reports/documents/exported documents are found, they are deleted. Call the UseEmptyStoragesCleaner method to register an empty storage cleaner instead of the default one, so that documents are not removed automatically.
using DevExpress.XtraReports.Web.WebDocumentViewer;
// ...
protected void Application_Start(object sender, System.EventArgs e) {
// ...
DefaultWebDocumentViewerContainer.UseEmptyStoragesCleaner();
}
Imports DevExpress.XtraReports.Web.WebDocumentViewer
' ...
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' ...
DefaultWebDocumentViewerContainer.UseEmptyStoragesCleaner()
End Sub
See Also
DefaultWebDocumentViewerContainer Class