2

I installed Commerce 9 in a new VM. Everything works fine, but when I am trying to open Bussiness Tools I got next exception :

enter image description here

In the content editor I could see all categories and products.

enter image description here

2
  • Have you populated the AllowedOrigins property to include the domain your accessing the Business Tools?
    – Rob Earlam
    Jul 12, 2018 at 23:48
  • I assume based on the screenshot that youhave BixFx site different to localhost:4200. It appears from exception that authoring site is trying to access your BizFX site. Can you add authoring url with http and https at the beginning in AllowedOrigin for BizFx? Jul 26, 2018 at 21:28

2 Answers 2

3
+25

Go to the config.json of your CommerceAuthoring website such as:

\CommerceAuthoring_Sc9\wwwroot\config.json

In the AppSettings\AllowedOrigins, make sure that an entry to your BizFx's URL is in the list. It's normally, localhost:4200, but since you changed it, you need to update this config setting.

UPDATE

Per Andrey's comment, yes, the URLs are case-sensitive.

3
  • I already changed that values to my own urls Jul 27, 2018 at 4:22
  • I tested on my local IIS by adding the https URLs sitecorebizfx.local and commerce-authoring.local. I updated the corresponding BizFxUri setting in the SitecoreBiz site\assets\config.json. I then updated the IdentityServer appsettings.json's AllowedCorsOrigins, PostLogoutRedirectUris, and RedirectUris to point to the new BizFx url. Lastly, I added the sitecorebizfx.local in the CommerceAuthoring's config.json. (I also updated the Business Tools url in SC's core to sitecorebizfx.local). I logged in to SC, clicked on Business Tools, logged in and worked.
    – Marco
    Jul 27, 2018 at 16:41
  • The host name should be exactly in the same format as the bizFX url, means that if you have a https://MyBizFx.url, and you request it from https://mybizfx.url, it won't work. please, add that to the answer Jul 27, 2018 at 16:43
0

Can you make sure you have done all of the following steps:

  1. Update the BizFxUri parameter in SitecoreBizFx\assets\config.json in your BizFx instance.

  2. Update the AllowedOrigins parameter in wwwroot\config.json in your Commerce Engine instance. Double check here to make sure the protocol is https and not http.

  3. Replace the default URL (localhost:4200) in the RedirectUris, PostLogoutRedirectUris, AllowedCorsOrigins parameters in SitecoreIdentityServer\wwwroot\appsettings.json in your Identity Server instance.

  4. Reset IIS.

  5. Finally, clear all browser cache and try again. This last step is important.

1
  • the problem of my issue was some sitecore custom code (routing), after I removed the custom code it works fine. Aug 1, 2018 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.