Search results

Dashboard Embedding in ASP.NET MVC Sample

This section explains how to embed the Bold BI dashboard into an ASP.NET MVC sample application by providing the dashboard URL.

Prerequisites

You need to follow these steps before running the given sample:

  • Download the sample from here.
  • For the Cloud, You should have an existing Bold BI Cloud application.
  • For On-Premise, You should have any of the following environment:
    • Install the latest Bold BI Enterprise build.
    • You should have Bold BI deployed on a Linux server.
    • You should have Bold BI running on Kubernetes.
    • You should have Bold BI running on Docker.

How to run the sample

  1. You need to set the following properties in EmbedProperties.cs file as follows.
    Embed Properties

    RootUrl Dashboard Server BI URL (ex: http://localhost:5000/bi, http://dashboard.syncfusion.com/bi)
    SiteIdentifier For Bold BI Enterprise edition, it should be like site/site1. For Bold BI Cloud, it should be empty string.
    UserEmail UserEmail of the Admin in your Bold BI, which will be used to get the dashboards list.
    EmbedSecret You can get your EmbedSecret key from embed tab by enabling Enable embed authentication in Administration page as mentioned in next step.
  2. You can get your Embed Secret key from the administrator setting section. Please refer to this link, for more details.

  3. In the Index.cshtml file, set the URL of the dashboard in the variable dashboardUrl that you want to render. Index.cshtml

  4. To get the dashboard URL, click on the Dashboard name in the dashboard list page. The dashboard will open in a new window when you click it. In that window, you can get the dashboard URL by copying the link up to the question mark, as shown in the following image. DashboardUrl

  5. Then, run your MVC application.