Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Dynamic Data Store issues after upgrading to 7

Vote:
 

Just upgraded a CMS6r2 site to 7 and we are running into the following error:

The property Criteria exists on both the old and new definitions but does not have the same type and is not convertible between the types.


Any advice would be greatly appreciated.

#73288
Jul 12, 2013 22:28
Vote:
 

Do you have this atrribute on your classes [EPiServerDataStore(AutomaticallyRemapStore=true)]

I believe they made changes between cms6 and cms6 r2 so you probably have to update stuf when upgrading to cms7. Have a look at this blog post from paul smith: http://world.episerver.com/Blogs/Paul-Smith/Dates1/2011/4/Dynamic-Data-Store--Tips-Tricks-and-Best-Practises/

http://world.episerver.com/Blogs/Paul-Smith/Dates1/2011/2/Dynamic-Data-Store--Easier-Store-Creation-and-Remapping/

 

#73292
Jul 14, 2013 11:35
Vote:
 

Thanks for the response, Eric.  I have used this method succesfully before for custom properties that we have built from scratch, but this appears to have something to do with the VisitorGroup store so I cannot add the attribute you have mentioned.

 

For further clarification, here is the rest of the stack trace:

[InvalidOperationException: 
The property Criteria exists on both the old and new definitions but does not have the same type and is not convertible between the types.]
   EPiServer.Data.Dynamic.StoreDefinition.RemapChanges(IDictionary`2 copyTypeBag, IList`1 newMappings, List`1 dataMoves) +1908
   EPiServer.Data.Dynamic.StoreDefinition.Remap(IDictionary`2 typeBag, StoreDefinitionParameters parameters) +900
   EPiServer.Data.Dynamic.StoreDefinition.Remap(Type type) +76
   EPiServer.Personalization.VisitorGroups.VisitorGroupStore.GetStore() +312
   EPiServer.Personalization.VisitorGroups.<List>d__0.MoveNext() +116
   System.Linq.WhereEnumerableIterator`1.MoveNext() +87
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +4216372
   EPiServer.Personalization.VisitorGroups.VisitorGroupInitialization.ValidateVisitorGroups(IEnumerable`1 visitorGroups) +177
   EPiServer.Personalization.VisitorGroups.VisitorGroupInitialization.InitializeStoredVisitorGroups(IServiceLocator locator) +135
   EPiServer.Personalization.VisitorGroups.<>c__DisplayClass1.<Initialize>b__0(Object , EventArgs ) +75

 

#73374
Jul 16, 2013 16:47
Vote:
 

Most likely the reason for this is a problem with assembly redirects. Please, check in your web.config:

  • there should be only one assemblyBinding element inside configuration/runtime element
  • the assemblyBinding element should have namespace defined: xmlns="urn:schemas-microsoft-com:asm.v1"
  • assemblyBinding should contain dependentAssembly element with correct bindingRedirect for EPiServer.ApplicationModules assembly (the one that contains type for the Criteria property)
#73574
Jul 30, 2013 9:03
Vote:
 

Sergii was right!

#74943
Sep 12, 2013 7:37
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.