Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

CROS Error When Embedding PowerBI to Blazor App

$
0
0

I'm hosting my Blazor Project which contain an embedded element from PowerBi. PowerBi embeddded element supposedly require a sign in to microsoft account. When debugging through localhost, the sign-in box appears just fine.enter image description here

but when I run it in hosted domain, the pop up immediately closed as soon as it appeared. I assumed there is something wrong with the CORS. and i've add configuration to handle CORS.

var MyAllowSpecificOrigins = "_myAllowSpecificOrigins";builder.Services.AddCors(options =>{    options.AddPolicy(name: MyAllowSpecificOrigins, policy =>    {        policy.WithOrigins("http://report.capcx.com","https://app.powerbi.com")                            .AllowAnyHeader()                            .AllowAnyMethod();    });});app.UseCors(MyAllowSpecificOrigins);

i've also made sure that the configuration is in the right order. does anyone know what might be missing here?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>