Skip to main content
A newer version of this page is available. .

Display Message Texts for Callback Errors

  • 2 minutes to read

Like other controls produced by DevExpress, the Web Dashboard control allows specifying the message text when an unhandled exception occurs. This text might contain either exception details or a generic error message. To learn common ways of handling errors, see Callback Exception Handling.

The displayed error message depends on the mode attribute setting within the <customErrors> section in Web.config.

<configuration>
  <system.web>
    <customErrors mode="On|Off|RemoteOnly">
    </customErrors>
  </system.web>
</configuration>

The mode attribute can be set to one of the following values.

Value Description
On The Web Dashboard control provides only general information about errors. Generic error text is shown for remote clients and on the local host. This is a localizable text defined by the ASPxperienceStringId.CallbackGenericErrorText constant.
Off The Web Dashboard control provides detailed errors for remote clients and the local host.
RemoteOnly The generic error text is shown only to the remote clients, and detailed ASP.NET errors are shown on the local host.

To show a custom error message on the client when an exception is thrown, set the httpErrors.errorMode attribute to Detailed in the Web.config file:

<configuration>
  <system.webServer>
    <!-- ...  -->
    <httpErrors errorMode="Detailed" />
  </system.webServer>
</configuration>

If you do not need to enable detailed errors for the entire application, you can use the location directive to enable it only for the dashboard control:

<configuration>
  <location path="dashboardControl">
    <system.webServer>
      <!-- ...  -->
      <httpErrors errorMode="Detailed" />
    </system.webServer>
  </location>
</configuration>