The 'X is undefined' error occurs or controls are rendered with incorrect styles
- 2 minutes to read
Possible Errors
“‘aspx***’ is undefined”
“ASPxClient*** is undefined”
The default styles/images/scripts for DevExpress ASP.NET controls are not loaded.
Solution
Check the following to solve this issue:
Make sure the ASPxHttpHandlerModule is registered in Web.config.
The ASPxHttpHandlerModule allows DevExpress ASP.NET controls to load their resources. The Web.config file should contain a reference to this module in the system.web/httpModules and system.webServer/modules (for IIS7 in integrated mode) sections. Registration is automatic if you place a DevExpress control on a form in Design view or if you use Project Templates to create an application. You can register the module if you create controls at runtime.
IIS (classic mode)
<system.web> <httpHandlers> <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.vX.Y, Version=X.Y.Z.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET" path="DX.ashx" validate="false" /> </httpHandlers> <httpModules> <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.vX.Y, Version=X.Y.Z.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule"/> </httpModules> </system.web>
IIS7 (integrated mode)
<system.web> <httpHandlers> <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.vX.Y, Version=X.Y.Z.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET" path="DX.ashx" validate="false" /> </httpHandlers> <httpModules> </httpModules> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <handlers> <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.vX.Y, Version=X.Y.Z.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET" name="ASPxHttpHandlerModule" path="DX.ashx" preCondition="integratedMode" /> </handlers> <modules> <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.vX.Y, Version=X.Y.Z.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule"/> </modules> </system.webServer>
Make sure the application’s folder is marked as a separate IIS application.
Add “Full control“ permission for the “IIS_IUSRS“ account in the application folder.
Rewrite URL. Add an exception for the DXR.axd URL if you specify a Rewrite URL rule in your Proxy Layer/URL Rewrite Module that blocks/rewrites requests from resource handlers:
- WebResource.axd (for standard handlers);
- DXR.axd (for the DevExpresss ASPxHttpHandlerModule).