这让我感到精神错乱,谢谢Recaptcha!有谁知道我可以在哪里获得MVC dll版本2.0.0.0的副本来让这个糟糕的Recaptcha工作?我已经尝试过所有以前版本的mvc和Recaptcha,但没有任何效果!它可以在我的本地计算机上使用1.0,但是如果我将它放到实时服务器上,它就没有了。有没有人有任何建议?
我应该指出我的网站是一个网站表单,
由于
这是一个愚蠢的错误:
发生错误
System.Exception: Unable to load one or more of the types in assembly 'Recaptcha, Version=1.0.4.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown:
System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute)
at umbraco.macro.GetXsltExtensionsImpl()
at umbraco.macro.b__6()
at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem)
at umbraco.macro.GetXsltExtensions()
at umbraco.macro.AddMacroXsltExtensions()
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
答案 0 :(得分:5)
请参阅Umbraco错误跟踪器上的this issue。 Umbraco中的手动DI容器,称为TypeFinder,用于在运行时动态加载XSLT和/ base扩展,这是错误的,ReCaptcha包含一个继承自System.Web.Mvc中的MvcHelper的类。因此,当DI容器尝试加载此类时,它会出错并杀死您的宏。
这将在Umbraco 4.10 as detailed here中修复(Shannon Deminick的TypeFinder来自现已解散的Umbraco v5正在向后移植),或者您可以手动将补丁从this fork here应用到Umbraco源(但这样做需要你自担风险。)