Server-Side Configuration (ASP.NET MVC)

This approach is based on the client-server model, that is, you need to create a server (backend) project and a client (frontend) part that includes all the necessary styles, scripts and HTML-templates.

This document describes how to create and configure an ASP.NET MVC application as a server-side solution to use the Web Dashboard.

You can select one of the following approaches:

  • The ASP.NET MVC Dashboard uses an API the DashboardConfigurator class exposes, by default. In this case, the DashboardConfigurator.Default object provides access to shared server-side settings.
  • If necessary, you can create and initialize separate DashboardConfigurator instances within an application to provide different server-side settings. For example, you can enable this capability in the MVC application to use separate settings for different views.

Add Route Definition

Call the RouteCollectionExtension.MapDashboardRoute method and pass the prefix to allow the HTML JavaScript Dashboard control to interact with the ASP.NET MVC backend. The code snippet below shows how to add the required code to the RouteConfig.cs file.

using DevExpress.DashboardWeb.Mvc;
// ...
public static void RegisterRoutes(RouteCollection routes) {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");
            routes.MapDashboardRoute("api/dashboard");
// ...
}

The api/dashboard prefix is used to handle requests from the client-side DashboardControl (the DashboardControlOptions.endpoint, DashboardBackendOptionsBuilder.Uri, and DashboardBackendOptions.Uri properties).

Note

To learn how to adjust routing when the Web Dashboard is used in ASP.NET MVC Areas, see the T541859 KB article.

Prepare a Dashboard Storage

The Web Dashboard requires creating a special dashboard storage. End-users can save new dashboards to this storage and open existing dashboards. See Preparing a Dashboard Storage for details on how to create a dashboard storage for the ASP.NET MVC server-side.

Register Default Data Sources

To learn how to supply end-users with a default data source set, see Register Default Data Sources.

Register Default Data Connections

This document describes how to provide a Web Dashboard with a predefined data connection set. These connections are displayed for end-users in the Dashboard Data Source Wizard when creating new data sources.

See Also