Personalization: System.InvalidOperationException when scaling out in DXC

Found in

EPiServer.CMS.Core 11.9.0

Fixed in

EPiServer.CMS.Core 11.9.4

Created

Aug 10, 2018

Updated

Aug 17, 2018

Area

CMS Core

State

Closed, Fixed and tested


Description

Steps to reproduce

  1. Personalize a block on the start page using a Visitor Group that has Geolocation criterion.
  2. Stop the site, for example, change the web.config file.
  3. Open a large number of tabs on the site (or generate requests from a performance testing application).

Expected
All requests should succeed.

Actual:
You get an exception "ValueFactory attempted to access the Value property of this instance"

NOTE: Might be tricky to reproduce this in Alloy sample site. It was reproducible in a customer environment.

System.InvalidOperationException: at System.Lazy`1.CreateValue (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Lazy`1.get_Value (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at EPiServer.Personalization.Internal.FirstActiveClientGeolocationResolver.ResolveLocation (EPiServer.Framework.AspNet, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at EPiServer.Personalization.VisitorGroups.Criteria.GeographicCriterionBase`1.IsMatch (EPiServer.Cms.AspNet, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at EPiServer.Personalization.VisitorGroups.VisitorGroupRole.IsMatchWithAllCriteria (EPiServer.Framework.AspNet, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at EPiServer.Personalization.VisitorGroups.VisitorGroupRole.IsMatchInternal (EPiServer.Framework.AspNet, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at EPiServer.Personalization.VisitorGroups.VisitorGroupRole.IsMatchCached (EPiServer.Framework.AspNet, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at EPiServer.Personalization.VisitorGroups.VisitorGroupRole.IsMatch (EPiServer.Framework.AspNet, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at EPiServer.Security.Internal.VisitorGroupSecurityDescriptor.HasAccess (EPiServer.Cms.AspNet, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at EPiServer.Core.Html.StringParsing.PersonalizedContentSecurityDescriptor.HasAccess (EPiServer, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at EPiServer.Core.Html.StringParsing.StringFragmentCollection.AddFilteredFragment (EPiServer, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at EPiServer.Core.Html.StringParsing.StringFragmentCollection.GetFilteredFragments (EPiServer, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at EPiServer.Core.ContentArea.get_FilteredItems (EPiServer, Version=11.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) at XX.Shared.Extensions.ContentAreaExtensions.Any (XX.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullXX.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: d:_work\2\s\src\XX.Shared\Extensions\ContentAreaExtensions.csXX.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 24) at XX.Shared.Extensions.ContentAreaExtensions.FilteredItemsOfType (XX.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullXX.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: d:_work\2\s\src\XX.Shared\Extensions\ContentAreaExtensions.csXX.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 36) at ASP.Page_Views_Pages_HomePage_cshtml.Execute (App_Web_nn0tnx4k, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nullApp_Web_nn0tnx4k, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null: D:\home\site\wwwroot\Views\Pages\HomePage.cshtmlApp_Web_nn0tnx4k, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null: 8) at System.Web.WebPages.WebPageBase.ExecutePageHierarchy (System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.WebViewPage.ExecutePageHierarchy (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.WebPages.StartPage.ExecutePageHierarchy (System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.WebPages.WebPageBase.ExecutePageHierarchy (System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>cDisplayClass21.<BeginInvokeAction>b_1e (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)