Back to Devexpress

Document Viewer Requirements and Limitations

xtrareports-400224-web-reporting-asp-net-mvc-reporting-document-viewer-in-asp-net-mvc-applications-quick-start-document-viewer-requirements-and-limitations.md

latest4.3 KB
Original Source

Document Viewer Requirements and Limitations

  • Jul 18, 2024
  • 2 minutes to read

Document Viewer Requirements

Required Libraries

Web Reporting components require DevExtreme and third-party libraries, which you can register automatically. To do this, add the resources section to the application’s Web.config file:

xml
<devExpress>
    <!-- ... -->
    <resources>
        <add type="ThirdParty" />
        <add type="DevExtreme" />
    </resources>
</devExpress>

For manual registration, review the following help topic: Client Script Libraries.

Register HTTP Handlers

Register ASPxHttpHandlerModule (DXXRDV.axd) in the web.config file as a module to process resources and as a handler to process data.

The ASPxHttpHandlerModule is automatically registered in this file in the following cases:

If you create the Document Viewer in code, you should register ASPxHttpHandlerModule explicitly. Insert the declarations in the system.web/httpModules and system.webServer/modules configuration sections, and add the handler registration to the system.web/httpHandlers and system.webServer/handlers sections.

xml

...
  <httpHandlers>
    ...
    <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v25.2, Version=25.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" 
         verb="GET,POST" path="DXXRDV.axd" validate="false" />
  </httpHandlers>  
  <httpModules>
    <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v25.2, Version=25.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
  </httpModules>


  <handlers>
    ...
    <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v25.2, Version=25.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" 
         verb="GET,POST" path="DXXRDV.axd" name="ASPxWebDocumentViewerHandlerModule" preCondition="integratedMode" />
  </handlers>
  <modules runAllManagedModulesForAllRequests="true">
    <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v25.2, Version=25.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
  </modules>

The Document Viewer validates the configuration and displays the following error message if the handler is not registered.

The DXXRDV.axd handler is not registered in the web.config (section: system.webServer/handlers). To disable web.config validation, use the DevExpress.Web.Mvc.WebDocumentViewerSettings.DisableHttpHandlerValidation property.

Do not use handlers and/or validate their registration in the following cases:

  • You use custom HTTP handlers or MVC controllers to process requests.
  • Handlers are registered in the <location> section, and automatic validation fails.

To disable automatic handler validation, set the WebDocumentViewerSettings.DisableHttpHandlerValidation option to true :

csharp
@Html.DevExpress().WebDocumentViewer(settings => {
    settings.Name = "WebDocumentViewer";
    settings.DisableHttpHandlerValidation = true;
}).Bind(Model.Report).GetHtml();
vb
@Html.DevExpress().WebDocumentViewer(Function(settings) 
    settings.Name = "WebDocumentViewer"
    settings.DisableHttpHandlerValidation = True
End Function).Bind(Model.Report).GetHtml()

Document Viewer Limitations

  • The following document formats do not support export to multiple files:

  • The Document Viewer prints a report by converting it to PDF and printing the PDF. This approach requires browser support for PDF.