cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vani2000
Helper I
Helper I

Notification Component -Error loading component

Hello,

I am creating PCF signal R notification component. I am following the documentation from the below URL

https://powerapps.microsoft.com/en-us/blog/notification-control-using-powerapps-component-framework-...

 

There were 3 parts(powerapps framework-typescript, Creating function in Azure, powerapps ) in the documentation, which i have done .

But i see Error Loading Control when i use the component. Has anyone faced similar kind of problems particularly for this component or do you have any fix or advice to me. 

Please let me know if i need to share any other information.

 

Regards

Vani

 

4 REPLIES 4
vani2000
Helper I
Helper I

Error message i get. Thanks in advance.

image.png

The issue relates to CORS or Cross Origin Resource Sharing see https://auth0.com/blog/cors-tutorial-a-guide-to-cross-origin-resource-sharing/ 

 

Your function in Azure needs to return a Access-Control-Allow-Origin header in the response but I suspect adding just 

 

req.HttpContext.Response.Headers.Add("Access-Control-Allow-Origin", "*");

 will be enough.

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

Hi, Thanks for the response. Please could you let me know where should i paste the code exactly. Is it in the function which i created in Azure. if yes, that function is not editable for me.

how can i edit that ? Please could you let me know?

Thanks

 

 

Hej,

I do agree with Ben. I would also say it is because of CORS.

As I know you can configure this in your Azure portal. When you open the Function, go to the tab "Platform features" and open "CORS" under API a flyout configuration will come in from the right. There you can add your source. I would not recommend adding a "*" there because this will allow requests from everywhere.

 

//Benedikt

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Users online (23,488)