When embedded powerbi report in Asp.net core 2.0 MVC page. I got " Exception was thrown at line 1000, column 335 in https://app.powerbi.com/13.0.3936.157/scripts/reportembed.externals.bundle.min.js 0x80070005 - JavaScript runtime error: Access is denied. .
The MVC page is like this:
<div class="col-sm-9" id="dashboardContainer" />
<script type="text/javascript">
var $dashboardContainer = $('#dashboardContainer')
var embedConfiguration = {
type: 'report',
id: "@ViewBag.Id",
embedUrl: "@ViewBag.Url",
accessToken: "@ViewBag.Token",
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true
}
}
var reportContainer = $('#dashboardContainer')[0];
var dashboard = powerbi.embed(reportContainer, embedConfiguration)
</script>
Interesting enough, if I put this into a Asp.net MVC page, there is no Access is denied error. I was wondering if there is any different between asp.net core mvc page and regular asp.net mvc page.
See if this helps you: JavaScript "Access is Denied" error - no iframes
Apparently there is a known issue with ASP.NET Core. Power BI Embedded doesn't support ASP.NET Core powerbi embeded in .net core 1.1
User contributions licensed under CC BY-SA 3.0