DashboardBuilder.BackendOptions(Action<DashboardBackendOptionsBuilder>) Method
Specifies options that allow you to configure the Web Dashboard’s back-end.
Namespace: DevExpress.DashboardAspNetCore
Assembly: DevExpress.Dashboard.v19.1.AspNetCore.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
config | Action<DashboardBackendOptionsBuilder> | A delegate that provides access to the Web Dashboard’s back-end options. |
Returns
Type | Description |
---|---|
DashboardBuilder | A reference to this instance after the operation has completed. |
Remarks
You can use the Web Dashboard for more than a combined application. The Web Dashboard allows you to separate the client and server parts. Use the BackendOptions method to specify server settings for the client dashboard application.
The code sample below shows how to configure the client: to set the server’s url and pass a custom Authorization header. Note that the Uri value should consist of a base URL where the Web Dashboard’s server side is hosted and a route prefix - a value that is set in the MVC / .NET Core MapDashboardRoute properties.
@(Html.DevExpress().Dashboard("dashboardControl1")
.BackendOptions(options => options.Uri("{baseURL}/api/dashboard").RequestHttpHeaders(headers => { headers.Add("Authorization", "AuthToken123"); }))
)