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

ASPxWebDocumentViewer.StaticInitialize() Method

Explicitly starts the Web Document Viewer initialization.

Namespace: DevExpress.XtraReports.Web

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

NuGet Package: DevExpress.Web.Reporting

#Declaration

public static void StaticInitialize()

#Remarks

The ASPxWebDocumentViewer is automatically initialized when rendering on your application’s Web page, but in specific cases, you need to trigger its initialization explicitly (for instance, when an AppPool is recycled).

The StaticInitialize method does the following:

  • Calls the static ASPxWebDocumentViewer constructor;
  • Registers HttpHandlers required for the Web Document Viewer;
  • Initializes all services for processing requests to the corresponding handler.

Use the StaticInitialize method at the application startup in the Global.asax file.

Note

To make the Document Viewer’s handlers work correctly, you should call this method after specifying the session state and registering additional services.

protected void Application_Start(Object sender, EventArgs e) {
    // ...  
   DevExpress.XtraReports.Web.WebDocumentViewer.Native.WebDocumentViewerBootstrapper.SessionState = 
        System.Web.SessionState.SessionStateBehavior.Required;
    // ...  
    DevExpress.XtraReports.Web.ASPxWebDocumentViewer.StaticInitialize();
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the StaticInitialize() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also