Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Event Portal CORS policy

Posted on by Microsoft Employee

Hi

I'm getting the following error

Access to manifest at 'xxxxxxxx-media.azureedge.net/.../manifest.json from origin 'yyyyyyyyyyy.microsoftcrmportals.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://www.xxxxxxxx.com' that is not equal to the supplied origin.

I've added the Access-Control-Allow-Origin in the site settings by giving it the name HTTP/Access-Control-Allow-Origin and giving it the first URL in the error message.

However it's not paying any attention what I have done, and is still displaying the same error message every time.

Can anyone explain what is going on?

Thanks

  • Suggested answer
    cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Event Portal CORS policy

    Hi LeeMC2021,

    We should edit header and footer files of event website folder directly.

    1. main.js 500 error

    Here is the default path of main.js file,

    https://org.microsoftcrmportals.com/eventmanagementapp/main.js

    please open web files > main.js check whether your main.js was added to the right path and relevant attachment was uploaded.

    pastedimage1611737400783v1.png

    pastedimage1611737448077v3.png

    Important: please upload attachments using the automation script instead of manual operation. 

    2. apikeys.civicomputing.com 400 bad request and "cookie control failed to verify..."

    Have you added the link(apikeys.civicomputing.com) to any files of event website?

    I assume that you are adding some external APIs in event website, because I see such error message: "cookie control failed to verify your API key", but not sure. If I'm right, please configure your API key correctly to get access to 3rd party website.

    3. You have included the Google Maps JavaScript API multiple times on this page.

    As the error indicated, please Include only one Google Maps JavaScript API in your page.

    4. favicon.ico 404 not found

    It doesn't matter, by default there isn't favicon for event website.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Event Portal CORS policy

    I am added my header and footer information to the template inside the CRM.

    Is this the correct way of doing it?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Event Portal CORS policy

    The links are in the header

    Below is what I think the relevant error messages are

    4718.error.PNG

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Event Portal CORS policy

    Hi LeeMC2021,

    If will be really helpful to me to analyze your issues if some core code or picture could be shared.

    Please open console to check whether any js or css is blocked.

    As per my understanding, it seems that these issues are related to CSS or HTML issue, but if is difficult to get more information from the text of description.

    Maybe I could answer to this issue:

    Also that series of links does not scroll up with the rest of the header, and appears over the events when I scroll the page.

    Make sure the series of links are added within header component.

    Regards,

    Clofly

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Event Portal CORS policy

    I am displaying events, however I am using my own bespoke header and footer. It is only the header and footer that I'm trying to change.

    I've deactivated any existing css files in the system - as they where overwriting some of what I was adding (It was adding it's additional linkedin and twitter images in addition to the ones I have)

    I've removed anything from the Nav and Footer form the angular download (and uploaded it to the system).

    I've updated the default header and footer templates inside the CRM with my own code.

    The footer is fine, but there is a link with a modal response, and a series of links which shows a new div with menu items.

    The link with the modal response only shows the modal not the links in it.

    The series of links shows the banner, but not the links. Although the links do flicker and disappear at the start, and the actual link themselves seems to be there but the words of the link are not viable.

    Also that series of links does not scroll up with the rest of the header, and appears over the events when I scroll the page.

    Either some of my css (or js) references are being blocked over overridden.

    Thanks

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Event Portal CORS policy

    Which page is more similar to your page?

    pastedimage1611650930206v1.png

    pastedimage1611650948491v2.png

    "The page now displays, but there are some dropdown JavaScript menu's which flicker then get replaced with just a plain panel.

    Also the menu items do not scroll up with the rest of the page and remain stationary."

    From issues you encountered, it seems that some CSS rules were changed improperly.

    Here is source code of the default header, you could overwrite the modified template if necessary..

    {% assign homeurl = website.adx_partialurl %}
    
    {% if request.params['URL'] == '/SignIn'%}
    
    {% else %}
    
    {% endif %}
    
    {% if user %}
      
    {% endif %}
    
    
    
    {% assign current_page = page.adx_partialurl %}
    {% assign sr_page = sitemarkers["Search"].url | remove: '/' %}
    {% assign forum_page = sitemarkers["Forums"].url | remove: '/' %}
    {% if current_page == sr_page or current_page == forum_page %}
      
    {% if current_page == sr_page %}

    {% editable snippets 'Search/Title' default: resx["Discover_Contoso"] %}

    {% include 'Search' %} {% endif %}
    {% endif %}

    However, I think your situation would be more similar to the second screenshot. If so, header and footer are not applicable to pages of event website.

    All sections(or pages) of event website(like screenshot 1) can be only customized via local development, please refer to this tutorial if my guess fits your case.(And you can find other tutorials related to the topic in the author's blog posts.)

    https://community.dynamics.com/crm/b/misscrm360exploration/posts/tutorial-customize-and-deploy-dynamics-365-marketing-event-management-or-other-portal

    Regards,

    Clofly

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Event Portal CORS policy

    The existing templates are a header and footer which the company would like me to add.

    They have external links to aid with display icons, css and javascript to display.

    I've now changed a few things around early this morning, and the previous error has now gone although I'm now getting a different problem - though console isn't showing an appropriate error (or at least I've not identified it)

    The page now displays, but there are some dropdown JavaScript menu's which flicker then get replaced with just a plain panel.

    Also the menu items do not scroll up with the rest of the page and remain stationary.

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Event Portal CORS policy

    Hi LeeMC2021,

    In Windows, we can use Paint App and its color-filled rectangle to hide sensitive information of picture.

    What do some existing templates mean? Do they refer to page templates?

    If so, event website is built with Angular, and portal hosted event website is associated with some dedicated page templates, therefore, it may doesn't work if we add other page template to it.(I believe the Manifest.json file is not required to event website.)

    Could you let me know what customization would you like to add?

    Regards,

    Clofly

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Event Portal CORS policy

    Thanks for replying

    I am using Event Portal

    The manifest.json file is one that I am trying to contact externally

    I cannot give a screenshot as I want to hide the urls I am using - the error is as typed.

    Thank you

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Event Portal CORS policy

    Could an Admin please contact me regarding my reply which has apparently been blocked?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans