1
votes

I get the following error in the Sitecore log file. On the Save To Database action in a WFFM form. Web Forms for Marketers 2.4 rev. 141008.

I have a custom WFMDataProvider that just return a connectionString. I get the error on production CD and not on CMS. (i'm not using the remoteWfmService) What am I missing?

3292 09:42:32 ERROR Save To Database failed.
Exception: System.Reflection.ReflectionTypeLoadException
Message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source: mscorlib
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.Data.Metadata.Edm.ObjectItemAttributeAssemblyLoader.LoadTypesFromAssembly()
   at System.Data.Metadata.Edm.ObjectItemAssemblyLoader.Load()
   at System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, ObjectItemLoadingSessionData loadingData)
   at System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, KnownAssembliesSet knownAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage, Object& loaderCookie, Dictionary`2& typesInLoading, List`1& errors)
   at System.Data.Metadata.Edm.ObjectItemCollection.LoadTypesExpensiveWay(Assembly assembly)
   at System.Data.Objects.DataClasses.RelationshipManager.TryGetRelationshipType(IEntityWrapper wrappedOwner, Type entityClrType, String relationshipName, AssociationType& associationType)
   at System.Data.Objects.DataClasses.RelationshipManager.GetRelatedEndInternal(String relationshipName, String targetRoleName)
   at System.Data.Objects.DataClasses.RelationshipManager.GetRelatedReference[TTargetEntity](String relationshipName, String targetRoleName)
   at Sitecore.Forms.Data.Field..ctor(IField field, Form form)
   at Sitecore.Forms.Data.DataProviders.WFMDataProvider.<>c__DisplayClass7.<InsertForm>b__6(IField f)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Sitecore.Forms.Data.DataProviders.WFMDataProvider.InsertForm(IForm form)
   at Sitecore.Forms.Data.DataManager.InsertForm(ID formId, AdaptedResultList fields, ID sessionID, String data)
   at Sitecore.Form.Submit.SaveToDatabase.Execute(ID formid, AdaptedResultList fields, Object[] data)

3292 09:42:32 WARN  Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Exception: System.Reflection.ReflectionTypeLoadException
Message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source: mscorlib
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.Data.Metadata.Edm.ObjectItemAttributeAssemblyLoader.LoadTypesFromAssembly()
   at System.Data.Metadata.Edm.ObjectItemAssemblyLoader.Load()
   at System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, ObjectItemLoadingSessionData loadingData)
   at System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, KnownAssembliesSet knownAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage, Object& loaderCookie, Dictionary`2& typesInLoading, List`1& errors)
   at System.Data.Metadata.Edm.ObjectItemCollection.LoadTypesExpensiveWay(Assembly assembly)
   at System.Data.Objects.DataClasses.RelationshipManager.TryGetRelationshipType(IEntityWrapper wrappedOwner, Type entityClrType, String relationshipName, AssociationType& associationType)
   at System.Data.Objects.DataClasses.RelationshipManager.GetRelatedEndInternal(String relationshipName, String targetRoleName)
   at System.Data.Objects.DataClasses.RelationshipManager.GetRelatedReference[TTargetEntity](String relationshipName, String targetRoleName)
   at Sitecore.Forms.Data.Field..ctor(IField field, Form form)
   at Sitecore.Forms.Data.DataProviders.WFMDataProvider.<>c__DisplayClass7.<InsertForm>b__6(IField f)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Sitecore.Forms.Data.DataProviders.WFMDataProvider.InsertForm(IForm form)
   at Sitecore.Forms.Data.DataManager.InsertForm(ID formId, AdaptedResultList fields, ID sessionID, String data)
   at Sitecore.Form.Submit.SaveToDatabase.Execute(ID formid, AdaptedResultList fields, Object[] data)
   at Sitecore.Form.Core.Submit.SubmitActionManager.ExecuteSaving(ID formID, ControlResult[] list, ActionDefinition[] actions, Boolean simpleAdapt, ID sessionID)

3292 09:42:32 WARN  Web Forms for Marketers: an exception: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. has occured while trying to execute an action.
1
Are you using a password that has special characters in it? I have found that WFFM doesn't cope very well with these as the connection string gets parsed into a an Entity Framework connection string. If so I would try a simple password just to rule that out. - Ian Graham
No the password does not have any crazy special characters. - Jan Bluemink
what does your connection string look like?Have you checked the metadata section in the connection string? - Ian Graham
Have you published all your forms and submit actions? Does the user you specified in your remoteWfmService connectionString have the necessary permissions to the forms items? Also make sure WFFM and any custom save action dll's have been deployed correctly to CD. - jammykam

1 Answers

0
votes

I have found that the MSCaptcha.dll is not deployed. Normally you get a Exception when this file is missing. But in this case the App_Config\include\Captcha.config was also missing.

If you remove this 2 files it looks like everything works fine with a form (without captcha) but the save to database action does not work and needs this MSCaptcha.dll. And so gives the error mentioned in the question. I am almost certain that this is the issue. I only need a deploy to confirm.