Registering ASPxHttpHandlerModule for Reporting Controls
- 3 minutes to read
For DevExpress Reporting controls to work correctly, the ASPxHttpHandlerModule should be registered in the web.config file as a module for resource processing and as a handler for data processing.
The ASPxHttpHandlerModule is automatically registered in this file in the following cases:
- When you create an application with reporting controls using DevExpress project templates;
- When you have a reporting control in ASP.NET WebForms markup and switch to the Design tab in Visual Studio;
- When you insert MVC reporting extensions using the Insert DevExpress MVC Extension Wizard.
You can also register ASPxHttpHandlerModule manually, for example, when you create a reporting control programmatically. Insert the module registration 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.
The following handlers are necessary depending on the control type:
- HTML5 Document Viewer - DXXRDV.axd;
- End-User Report Designer - DXXRD.axd, DXXRDV.axd and DXQB.axd;
- Query Builder - DXQB.axd.
<system.web>
...
<httpHandlers>
...
<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v17.2, Version=17.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
verb="GET,POST" path="DXXRD.axd" validate="false" />
<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v17.2, Version=17.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
verb="GET,POST" path="DXXRDV.axd" validate="false" />
<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v17.2, Version=17.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
verb="GET,POST" path="DXQB.axd" validate="false" />
</httpHandlers>
<httpModules>
<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v17.2, Version=17.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
</httpModules>
</system.web>
<system.webServer>
<handlers>
...
<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v17.2, Version=17.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
verb="GET,POST" path="DXXRD.axd" name="ASPxReportDesignerHandlerModule" preCondition="integratedMode" />
<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v17.2, Version=17.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
verb="GET,POST" path="DXXRDV.axd" name="ASPxWebDocumentViewerHandlerModule" preCondition="integratedMode" />
<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v17.2, Version=17.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
verb="GET,POST" path="DXQB.axd" name="ASPxQueryBuilderDesignerHandlerModule" preCondition="integratedMode" />
</handlers>
<modules runAllManagedModulesForAllRequests="true">
<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v17.2, Version=17.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
</modules>
</system.webServer>
When rendering, reporting controls check the resulting configuration for the corresponding handlers’ presence. If these handlers are not registered, an error appears similar to the following:
“The DXXRD.axd handler is not registered in the web.config (section: system.webServer/handlers). To disable web.config validation, use the DevExpress.XtraReports.Web.ASPxReportDesigner.DisableHttpHandlerValidation property.“
In specific cases, you may not need to use handlers and/or validate their registration:
- When you do not use the standard handlers and process requests in your custom HTTP handlers or MVC controllers;
- When you do not work with SQL data sources and do not need the Query Builder in the Report Designer (the DXQB.axd handler);
- When handlers are registered inside the <location> section, and it is impossible to perform automatic validation.
In these scenarios, you can disable the handler validation as shown below depending on your target platform:
ASP.NET WebForms
Set the reporting control’s ASPxWebClientUIControl.DisableHttpHandlerValidation property to true.
ASP.NET MVC
Set the ReportDesignerSettings.DisableHttpHandlerValidation or WebDocumentViewerSettings.DisableHttpHandlerValidation option to true.