-2

I have one issue with FXM (Having in mind that all the configurations are enabled).

Here are my configuration details

Sitecore root url - https://projectsample.sc/sitecore

External URL - http://sampledemo/index.aspx

Generated scripts by the FXM has been added to the external url

Steps followed:

I added new external website by using Federated Experience Manager
it generates bundle/beacon script.

I added that script tag to the external page and when I open FEM it
throws error ("Could not validate beacon script - error")

Any help on this would be of great help.

2

I can see that your websites are using different protocols, one is http and the other one is https. If you look at the sitecore limitations on https://doc.sitecore.com/developers/93/sitecore-experience-platform/en/requirements-and-limitations.html it is stated this: Your Sitecore site and the external site must both have the same type of connection – http or https

If you are still receiving errors after changing the two websites to the same connection type, you can verify if there are any errors in the FXM logs. If you don't have it enabled in the \App_Config\Sitecore\FederatedExperienceManager\Sitecore.FXM.config file, set the log level to DEBUG:

<logger name="Sitecore.FXM.Diagnostics" additivity="false">   
<level value="DEBUG" />   
<appender-ref ref="FxmLogFileAppender" /> 
</logger>
1
  • Thanks Cristi. Even after making the connection changes the issue was persisting. I checked the network tab found the issue was with CORS. Feb 22 at 19:06
0

I was able to solve the error by enabling CORS in the external website.

2
  • Hey, Please add information where and how you enabled CORS to have for meaningful answer Feb 23 at 13:51
  • 1
    Hey Peter Since the external site for me was an MVC application. I enabled to CORS in the global.asax.cs file. We need to install the CORS package and add the below code. var cors = new System.Web.Http.Cors.EnableCorsAttribute("", "", "*"); GlobalConfiguration.Configuration.EnableCors(cors); Feb 24 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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