1

We are using DXA2.1 version with Sites 9 - and when I am trying to set up locally and run the page locally am facing below issue but the same code is working for few of my colleagues - tried all the possible ways

1) checked the .NetFramework and reinstalled the same i.e. 4.6.2

2) removed all the existing dll's and configured the same via NuGet manager but still the same...checked all the discovery services are running fine 3)lastly have installed the latest version of VS2017(Editorial Version) but still the same.

Need some assistance ASAP

  • $exception {"An error occurred while resolving evidence using the Context Service."} Sdl.Web.Common.DxaException

This is the StackTrace:

at Sdl.Web.Tridion.Context.ContextServiceClaimsProvider.GetContextClaims(String aspectName, Localization localization)
   at Sdl.Web.Mvc.Context.ContextEngine..ctor()
   at Sdl.Web.Mvc.Configuration.WebRequestContext.get_ContextEngine()
   at Sdl.Web.Site.MvcApplication.<>c__DisplayClass3_0.<RegisterDisplayModes>b__0(HttpContextBase ctx) in C:\Projects\WFH_DXA\DxaWebApp2.1\Site\Global.asax.cs:line 177
   at System.Web.WebPages.DefaultDisplayMode.CanHandleContext(HttpContextBase httpContext)
   at System.Web.WebPages.DisplayModeProvider.<GetAvailableDisplayModesForContext>d__4.MoveNext()
   at System.Web.Mvc.VirtualPathProviderViewEngine.GetPath(ControllerContext controllerContext, String[] locations, String[] areaLocations, String locationsPropertyName, String name, String controllerName, String cacheKeyPrefix, Boolean useCache, String[]& searchedLocations)
   at System.Web.Mvc.VirtualPathProviderViewEngine.FindView(ControllerContext controllerContext, String viewName, String masterName, Boolean useCache)
   at System.Web.Mvc.ViewEngineCollection.<>c__DisplayClass6.<FindView>b__4(IViewEngine e)
   at System.Web.Mvc.ViewEngineCollection.Find(Func`2 lookup, Boolean trackSearchedPaths)
   at System.Web.Mvc.ViewEngineCollection.FindView(ControllerContext controllerContext, String viewName, String masterName)
   at System.Web.Mvc.ViewResult.FindView(ControllerContext context)
   at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)

2019-04-03 21:12:36,768 [9] ERROR - System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.Dictionary2[System.String,System.Object]' to type 'System.Collections.Generic.Dictionary2[System.String,System.String]'. at Sdl.Web.Delivery.ADF.ClaimStore.ClaimStore.Get[T](Uri claimUri)
at Sdl.Web.Tridion.ApiClient.ApiClientFactory.CreateClient() at Sdl.Web.Tridion.ModelService.GraphQLModelServiceProvider.get_Client() at Sdl.Web.Tridion.ModelService.GraphQLModelServiceProvider.GetPageModelData(String urlPath, Localization localization, Boolean addIncludes) at Sdl.Web.Tridion.Mapping.DefaultContentProvider.LoadPageModel(String& urlPath, Boolean addIncludes, Localization localization) at Sdl.Web.Tridion.Mapping.DefaultContentProvider.<>c__DisplayClass1_1.b__0() at Sdl.Web.Tridion.Caching.CacheProvider.GetOrAdd[T](String key, String region, Func1 addFunction, IEnumerable1 dependencies) at Sdl.Web.Tridion.Mapping.DefaultContentProvider.GetPageModel(String urlPath, Localization localization, Boolean addIncludes) at Sdl.Web.Mvc.Controllers.PageController.Page(String pageUrl)

UPDATE :

While running from Google Chrome Version 73.0.3683.86 (Official Build) (64-bit) am getting the above Exception

But tried with Internet Explore 11, the Page is Getting Loaded without any exception

  • Did you configured to place this config \bin\config\cd_ambient_conf.xml? Is that ContextService is running and accessible to your web application? check is there any error in the context service? – Velmurugan Apr 4 at 15:10
  • Seems to be a problem with context claims / ADF, indeed, but it’s remarkable that it only happens on some machines. Furthermore, there seem to be two separate issues (two different stack traces) – Rick Pannekoek Apr 4 at 19:15
  • Can you try to disable the ADF Module in Web.config? – Rick Pannekoek Apr 4 at 19:17
  • Velmurugan : i checked above settings am able to access Context Service – Shalivahan Kanur Apr 5 at 7:35
  • RickPannekoek: i tried to disable the ADF - it was not throwing the above expection but it was going to 500 Error page because application required ADF claims and also added update section to above question... i.e. when i load from IE enabling ADF it was loading fine without any exception but when i try from Chrome it was giving me same error which is wearied... any thoughts on this – Shalivahan Kanur Apr 5 at 7:36
2

I had a similar issue with DXA 2.0 and Tridion 8.5. Solved it by clearing the cookies in the browser.

  • same issue in DXA 2.2 and sites 9.0. Working in incognito window and IE. – Rameshponna Aug 8 at 10:25

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.