【问题标题】:AWS Quicksight embedded dashboard .NET Core 2.1AWS Quicksight 嵌入式仪表板 .NET Core 2.1
【发布时间】:2021-08-14 08:28:15
【问题描述】:

我正在尝试在我们公司的网站上嵌入仪表板。我正在使用 .NET Core 2.1 和 AWSSDK 3.3.1.12 我们正在使用 API Gateway 在 AWS Lambda 上运行我们的网站。

我已按照这 2 个指南设置权限并设置端点以获取嵌入仪表板 URL

我已成功获取嵌入仪表板 URL

var getDashboardUrl = await client.GetDashboardEmbedUrlAsync(new GetDashboardEmbedUrlRequest
                {
                    AwsAccountId = awsAccountId,
                    IdentityType = EmbeddingIdentityType.QUICKSIGHT,
                    DashboardId = testDashboardId,
                    SessionLifetimeInMinutes = 100,
                    ResetDisabled = true,
                    UndoRedoDisabled = false,
                    Namespace = "default",
                    UserArn = $"arn:aws:quicksight:us-east-1:{awsAccountId}:user/default/{email}",
                    StatePersistenceEnabled = true
                });

并使用 Quicksight javascript SDK 嵌入仪表板,但出现错误。它显示正在加载仪表板,但加载后会显示一条消息“我们无法显示此页面(未授权)

Error message that I get on our site

function embedDashboard(embedUrl) {
    let containerDiv = document.getElementById("embeddingContainer");
    let options = {
        // replace this dummy url with the one generated via embedding API
        url: embedUrl,
        container: containerDiv,
        scrolling: "no",
        height: "700px",
        width: "1000px",
        footerPaddingEnabled: true
    };
    dashboard = QuickSightEmbedding.embedDashboard(options);
}

如果您需要更多信息,请告诉我

【问题讨论】:

    标签: c# amazon-web-services asp.net-core quicksight-embedding amazon-quicksight


    【解决方案1】:

    检查 url 是否以某种方式编码。一个常见问题是在将 url 字符串传递给嵌入脚本时转义了 & 字符。

    ...&identityprovider=quicksight&isauthcode=true
    

    可以传递为

    ...&identityprovider=quicksight&isauthcode=true
    

    这会导致嵌入失败。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-03-13
      • 1970-01-01
      • 2020-12-22
      • 1970-01-01
      • 2019-06-09
      • 2021-12-16
      • 1970-01-01
      相关资源
      最近更新 更多