Wednesday, June 13, 2018

Sitecore Experience Commerce - Commerce service Error code Forbidden

On the content management server of a Sitecore enthronement containing Experience Commerce 9 (update 1), the following was appearing in the logs when attempting to refresh the commerce cache:
An error occured while trying to contact the Commerce Service. Error code Forbidden
I tried two things and one of which (or the combination) was able to resolve this error:
  1. In the show config page (site/admin/showconfig.aspx) the configuration where the URLs for the shops/ops service had line spacing. I moved these onto one line.
  2. On the commerce engine shops environment I opened the config.json file and added the URL for the content management server to the AllowedOrigins array.
Please leave a comment below, if you have found other causes for this error.

No comments:

Post a Comment