AndyButland / UmbracoPersonalisationGroups

Package for personalisation of content with Umbraco.
MIT License
38 stars 18 forks source link

Assembley Binding for Maxmind.GeoIP2 #11

Closed michael-nee-mw closed 6 years ago

michael-nee-mw commented 6 years ago

Installed the package, but when using Location matching with Maxmind.GeoIP always receiving this assembly error despite the MaxMind.GeoIP being installed and located.

System.Exception occurred
  HResult=0x80131500
  Message=Exception while creating a value.
  Source=Umbraco.Core
  StackTrace:
   at Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem, Nullable`1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, CacheDependency dependency)
   at Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem)
   at Umbraco.Core.Cache.DeepCloneRuntimeCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem)
   at Zone.UmbracoPersonalisationGroups.Providers.GeoLocation.MaxMindGeoLocationProvider.GetCountryFromIp(String ip)
   at Zone.UmbracoPersonalisationGroups.Criteria.Region.RegionPersonalisationGroupCriteria.MatchesVisitor(String definition)
   at Zone.UmbracoPersonalisationGroups.PersonalisationGroupMatcher.IsMatch(PersonalisationGroupDefinitionDetail definitionDetail)
   at Zone.UmbracoPersonalisationGroups.PersonalisationGroupMatcher.CountMatchingDefinitionDetails(PersonalisationGroupDefinition definition)
   at Zone.UmbracoPersonalisationGroups.Helpers.UmbracoExtensionsHelper.MatchGroups(IList`1 pickedGroups)
   at Zone.UmbracoPersonalisationGroups.Helpers.UmbracoExtensionsHelper.MatchGroup(IPublishedContent pickedGroup)
   at Zone.UmbracoPersonalisationGroups.Helpers.UmbracoExtensionsHelper.MatchGroupsByName(String[] groupNames, IList`1 groups, PersonalisationGroupDefinitionMatch matchType)
   at Umbraco.Web.UmbracoHelperExtensions.MatchesGroup(UmbracoHelper helper, String groupName)
   at ASP._Page_Views_MovingHome_cshtml.Execute() in c:\Websites\mediaworks\Yorkshire Water\YorkshireWater\Views\MovingHome.cshtml:line 7
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
   at System.Web.WebPages.StartPage.RunPage()
   at System.Web.WebPages.StartPage.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
   at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
   at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
   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)

Inner Exception 1:
FileLoadException: Could not load file or assembly 'MaxMind.GeoIP2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I've added redirect bindings in the web.config to no success. Also it's asking for 2.1.0.0 but the package it installs 2.3.0.0.

AndyButland commented 6 years ago

I've not seen this I'm afraid, and have just installed and tested the latest Umbraco and package versions with the Maxmind.GeoIP location based groups and seems to be working as expected; am not seeing this error.

I've these two packages installed:

  <package id="MaxMind.Db" version="1.0.1.0" targetFramework="net452" />
  <package id="MaxMind.GeoIP2" version="2.3.0.0" targetFramework="net452" />

Maybe worth checking, in VS.Net, Tools > Manage NuGet Packages for Solution... and the Consolidate tab and see if you have different versions in different projects somehow, and make sure all are using 2.3.0?

RinkuChoudhary226 commented 3 years ago

I've not seen this I'm afraid, and have just installed and tested the latest Umbraco and package versions with the Maxmind.GeoIP location based groups and seems to be working as expected; am not seeing this error.

I've these two packages installed:

  <package id="MaxMind.Db" version="1.0.1.0" targetFramework="net452" />
  <package id="MaxMind.GeoIP2" version="2.3.0.0" targetFramework="net452" />

Maybe worth checking, in VS.Net, Tools > Manage NuGet Packages for Solution... and the Consolidate tab and see if you have different versions in different projects somehow, and make sure all are using 2.3.0?

hey @AndyButland , i was also having same issue in umbraco 8.14 . now i have downleded same version package . it's working now ..Thanks