Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Pieter_BE
New Member

WinForms WebView2 Embedded PowerBI

Hi,

 

We are using PowerBI Embedded in a .NET 4.8 WinForms application.
For integrating the webpage, we use WebView2.

 

Since a few days our application is unable to show the reports. (No code changes in our client/server in a few weeks).

The message is 'The content is unavailble. More information about Power BI.> ' (translated from Dutch).

What have I tried:

- Checked the developer window of the WebView2, but no errors.

- Saved the HTML to file & opened in browser (both Edge & Chrome) -> works perfectly.

- Loading the HTML in WebView (old deprecated NuGet packages) -> works perfecly.
Left we see WebView2 and on the right is the WebView. The same html string is passed to both controls.

Pieter_BE_0-1656426115359.png

I cannot provide a sample project, since the reports are business information that cannot be spread.

 

I'm all out of idea's to pinpoint the problem. Any idea's/suggestions what I can try next?

 

Kind regards,

Pieter

1 ACCEPTED SOLUTION
Pieter_BE
New Member

Problem solved itself!

I assume it was a bug related to the june release.

View solution in original post

2 REPLIES 2
Pieter_BE
New Member

Problem solved itself!

I assume it was a bug related to the june release.

Pieter_BE
New Member

This is the HTML that is used:
accesToken / embedUrl / reportId has to be filled in to work.

 

<html>
<head>
  <script src=""https://cdnjs.cloudflare.com/ajax/libs/powerbi-client/2.14.1/powerbi.min.js""></script>
</head>
<body>
  <div id=""reportContainer""/>
  <script>
    var accessToken = ""{accessToken}"";
    var embedUrl = ""{embedUrl}"";
    var embedReportId = ""{reportId}"";
    var models = window['powerbi-client'].models;

    var config = {{
        type: 'report',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,
    
        permissions: models.Permissions.All,
          settings: {{
         filterPaneEnabled: true,  
         navContentPaneEnabled: false,
       }}
    }};
    var reportContainer = document.getElementById('reportContainer');
    var report = powerbi.embed(reportContainer, config);
  </script>
</body>
</html>

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.