Showing results for 
Search instead for 
Did you mean: 
New Member

No 'Access-Control-Allow-Origin' header is present on the requested resource.



We have one MVC Web Application(Embeded PowerBI) which displyed dashboard from powerBI service(Its a simple Web Application didn't used any WebAPI.). PowerBI Dashboard contains an image on it, by clicking on the image we redirects it to one custom link and it works fine from dashboard, but same thing not works from our Embeded PowerBI web application. When I clicked on image following error has been thrown (client site error in Crome)-


Error : XMLHttpRequest cannot load.....No 'Access-Control-Allow-Origin' header is present on the requested resource.


To resolve this I have tried below methods but it’s does not worked -

  1. Added Reference of System.Web.Http.Cors library from Nuget Package.

                 Added 'EnableCors' attribute at controller as well as action level -

                [EnableCors(origins: "*", headers: "*", methods: "*")]


  1. Adding Web server settings in Web.config file.

                        <add name="Access-Control-Allow-Origin" value="*" />



Please help me regarding this issue.


Helper IV
Helper IV

Can you expand on how to enable the header properly?

Helpful resources

PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors