sitecoreweb-forms-for-marketers

Sitecore WFFM Save To Database failed


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.

Solution

  • 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.