The requested page is not available for the requested platform. You are viewing the content for Default platform.

Server-Side Configuration (ASP.NET MVC)

This approach is based on the client-server model. You need a server (backend) project and a client (frontend) application that includes all the necessary styles, scripts and HTML-templates. Note that the script version on the client should match with libraries version on the server up to a minor version.

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

You can start with the following tutorials:

Customize the following settings to use the created ASP.NET MVC Dashboard application as server:

Add Route Definition

In the DashboardConfig.cs file, call the RouteCollectionExtension.MapDashboardRoute method and pass the prefix to allow the HTML JavaScript Dashboard control to interact with the ASP.NET MVC backend:

using DevExpress.DashboardWeb.Mvc;
// ...
public static void RegisterRoutes(RouteCollection routes) {
    routes.MapDashboardRoute("api/dashboard");
    // ...
}

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

Note

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

Enable CORS

You need to configure corresponding permissions to access the HTML JavaScript Dashboard from a server at a different origin. See Cross-Origin Resource Sharing for information on how to set up cross-origin resource sharing (CORS) on your back-end.

Next Steps

  • 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