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. In this sample, we have rendered the dashboard embedding using Single Sign On (SSO) with Token-based authentication. The explanation is concise.

DashboardView

Prerequisites

How to run the sample

  1. Please retrieve the sample of the Iframe Dashboard embedding ASP.NET MVC from GitHub.

  2. You are required to set the following properties in the EmbedProperties.cs file as follows.

    Embed Properties

    UserEmail UserEmail of the Admin in your Bold BI, which will be used to get the dashboard.
    EmbedSecret Get your EmbedSecret key from embed tab by enabling Enable embed authentication in the Administration page.
    DashboardUrl Get the dashboard URL of the dashboard in your Bold BI.
  3. Once you have configured the above embed properties, you can proceed to run your MVC application.

    DashboardView

How this sample works

  1. The dashboard will be rendered in the iframe using SSO with token based authentication, based on the DashboardUrl and other values set in the EmbedProperties.cs file.

    Embed Properties

  2. The Embed parameters and the Embed Secret Key are mandatory parameters used to generate the Embed Signature. The embed signature files a hashed value generated for authentication in an embed request to the Bold BI server. It is obtained by using the SignURL method with the embedParameters and embedSecretKey, and it is then appended to the iframe URL as the embed_signature query parameter.

    Signature

  3. In index.cshtml, the variables embedSignature and dashboardUrl are retrieved from HomeController.cs and EmbedProperties.cs respectively. The iframe URL is formed by appending the embed signature and parameters to the dashboard URL. This URL is then used to render the dashboard within an <iframe> element.

    Index Html

NOTE: You have the ability to customize the optional parameters within the HomeController.cs file.