November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
I believe you now need to use Microsoft.AspNetCore.Http.HttpContext
Please see more info here : https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-context?view=aspnetcore-6.0
Hello,
We upgraded CMS 11 to 12 using upgrade assistant and fixed package and other errors related to .Net core. Now when we run application we are facing this error in CookiePersonalizationEvaluator:
public class CookiePersonalizationEvaluator : IPersonalizationEvaluator
{
public const string PersonalizeCookieKey = "Personalize";
private readonly ServiceAccessor<HttpRequest> _requestAccessor;
public CookiePersonalizationEvaluator(ServiceAccessor<HttpRequest> requestAccessor)
{
_requestAccessor = requestAccessor;
}
public bool Personalize() => _requestAccessor()?.Cookies[PersonalizeCookieKey] != null;
}
"Unable to resolve service for type 'EPiServer.ServiceLocation.ServiceAccessor`1[Microsoft.AspNetCore.Http.HttpRequest]' while attempting to activate '..Business.Personalisation.CookiePersonalizationEvaluator' "
As per the document https://docs.developers.optimizely.com/content-cloud/v12.0.0-content-cloud/docs/disable-visitor-group-personalization it says to use HttpRequestBase but in .net core it doesn't support it.
Please help with this issue?