Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Event Portals

Posted on by 35

Hello All,

We have two event portals in our demo environment. Event Portal Website Bindings Old, Website Bindings New.

I followed the https://docs.microsoft.com/en-us/dynamics365/marketing/developer/portal-hosted link and deployed the Event portal using Website Bindings New.

The New Event portal works fine but the old one is not working and it is displaying error poining to the new Event portal website binging name.

pastedimage1607109780992v1.png

Can anyone faced the issue? If so how can i make the old portal start working?

Can i deploy the event website with apiendpoint as old portal website binding or Reset the old portal.

Let me know if you need any other questions/information.

Kind Regards

Abhilash.

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Event Portals

    Hi Abhilash,

    We can only keep one site settings record, because only one URL is allowed as the value of HTTP/Access-Control-Allow-Origin header, and Portal Management app doesn't provide a mechanism to merge value of two site settings records into a whitelist: if there are two same header records, only URL of the first created record will be accepted.

    So we have to change the existing record to localhost when we need to customize event website locally and then revert back the value to URL of portal.

    However, if you only want to debug the application, you could execute browser in DEV mode to pass web security check:

    Run a bat file(on desktop) with following command:(It works for Edge and Chrome, if you are using Chrome, change the path to the path of your Chrome. )

    "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --user-data-dir="C:\DevChrome" --disable-web-security 
     

    Browser will inform us that the command line poses security risk, but it's should be fine for simple local test.

    1373.PNG

    By doing this, the old event portal can keep running without interruption.

    Regards,

    Clofly

  • Abhi546 Profile Picture
    Abhi546 35 on at
    RE: Event Portals

    Dear Clofly,

    Thank you for the solution it works.

    Can you help me i want to run the event portal on my localhost:4200, can i create two records HTTP/Access-Control-Allow-Origin with value "old event portal" and "http://localhost:4200" ?

    or can i change the already existing record to  "http://localhost:4200"  when i want to run the event website and revert back the value to "Old event portal".

    Kind Regards

    Abhilash.

  • Verified answer
    cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Event Portals

    Hi Abhilash,

    You could open console to check detail of the error, and it would be helpful if you could share it here.

    Did you use same apiEndPoint value(environment.ts) for old and new portals?

    For example, you are using "newapp.microsoftcrmportals.com" API end point for both oldapp.microsoftcrmportals.com and newapp.microsoftcrmportals.com.

    If so, the back-end service of the new portal may regards that requests from the old portal are from another website, thus it blocks them due to CORS.

    Therefore, as the link you posted mentioned, try creating a site settings record to for URL of the old portal to allow it can get access to service endpoint of new portal:

    https://docs.microsoft.com/en-us/dynamics365/marketing/developer/portal-hosted#configuring-cross-origin-resource-sharing-cors

    Regards,

    Clofly

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans