November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Martin,
Are you able to confirm that the Find index configured in the web.config is valid?
Hi Johnny,
Yes it is a valid developer licsence that I generated. It is full of content too after I indexed.
Hi Martin,
I too have tried the RefreshPreferences attribute and can confirm that i reproduced the same exception as you. This will need to be raised as a bug with the Personalization team.
However I got it working using the other method.
First ensure you are injecting the IClient dependancy correctly into the controller constructor.
You can confirm that the IClient dependancy has been injected in correctly by setting a breakpoint in your code and inspecting the client object. You should be able to inspect the client object after the dependancy is injected to find your Personalization settings
Once you are happy the client is being set correctly, simply add the following code to the index of your controller
System.Threading.Tasks.Task.Factory.StartNew(currentContext => { System.Web.HttpContext.Current = (HttpContext)currentContext; _client.Personalization().Refresh(); }, System.Web.HttpContext.Current.ApplicationInstance.Context);
Hi,
I am currently follwing post: https://world.episerver.com/documentation/developer-guides/find/personalized-find/
I have added in the appropriate app settings for episerver:personalization.Site and episerver:personalization.ClientToken and have added
UsingPersonalization() extension method to the search query. Up this point the site runs fine.
However when I add the Controller Attribute:
[EPiServer.Find.Personalization.RefreshPreferences]
or use the below code to refresh the personalization:
my site won't wont run at all and gives the following object reference error:
Any help as to why this would be greatly appreciated!
Regards,
Martin