Server-Side Configuration (ASP.NET Core)

  • 3 min to read

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 Core 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 Core Dashboard application as server:

Map Dashboard Route

In the Startup.cs file, call the RouteBuilderExtension.MapDashboardRoute method and pass the prefix to allow the HTML JavaScript Dashboard control to interact with the ASP.NET Core backend.

Starting from ASP.NET Core 2.2, the .NET Core application supports two routing types: routing at the MVC level and endpoint routing.

public void Configure(IApplicationBuilder app, IHostingEnvironment env) {
    // ...
    app.UseMvc(routes => {
            // ...

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).

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 Core server side.

  • Register Default Data Sources

    See Register Default Data Sources for details on how to supply end-users with a default data source set.

  • Register Default Data Connections

    See Register Default Data Connections to learn how to provide a Web Dashboard with a predefined data connection set. The Dashboard Data Source Wizard displays these connections for end-users when creating new data sources.

See Also