Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lennart Stoop 304 posts 842 karma points
    Jul 25, 2011 @ 15:57
    Lennart Stoop
    0

    Upgrade to 4.7.0 - Recaptcha missing assembly reference

    Hey guys,

    I'm dealing with an assembly reference exception when upgrading an Umbraco install from version 4.5.2 to 4.7.0. (Win 2003, .NET Framework 4, ASP.NET 4)

    When I look at the debug/trace on the home page, I'm getting following error message for each macro:

    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=1.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)
    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=1.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.<GetXsltExtensions>b__4()
      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.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters)
      at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)

    What I would like to understand is:

    1) Why is the error being thrown in each macro? There are no XSLT extensions that use Recaptcha nor do any of the macros on the page use Recaptcha.

    2) ASP.NET MVC 1 has not been installed on the server (and it has not been GAC'ed) neither are there any MVC dll's in the bin folder - how can this have worked in 4.5.2?

    3) I managed to workaround by copying the MVC 2 dll's to the bin folder, and adding an assembly binding entry in the web.config like so:

    <dependentAssembly>
       <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
       <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/>
    </dependentAssembly>

    I think this is kind of hacky however, perhaps one of you smart guys know of a better solution? :-)

     

    Grtz

    Lennart

  • julius 107 posts 289 karma points
    Dec 28, 2011 @ 23:35
    julius
    0

    I am getting an assembly reference exception when I want to add a new XSLT file in the umbraco backoffice. I go to the Developer section, rightclick + create the XSLT folder, type a name in the box that appears, submit, and this is what I get. I am not using ReCaptcha, nor am I using MVC.

     

     

    Server Error in '/' Application.


    Unable to load one or more of the types in assembly 'Recaptcha, Version=1.0.5.0, Culture=neutral, PublicKeyToken=9afc4d65b28c38c2'. Exceptions were thrown:
    System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Exception: Unable to load one or more of the types in assembly 'Recaptcha, Version=1.0.5.0, Culture=neutral, PublicKeyToken=9afc4d65b28c38c2'. Exceptions were thrown:
    System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [Exception: Unable to load one or more of the types in assembly 'Recaptcha, Version=1.0.5.0, Culture=neutral, PublicKeyToken=9afc4d65b28c38c2'. Exceptions were thrown:
    System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
       umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) +955
       umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) +145
       umbraco.macro.GetXsltExtensionsImpl() +1028
       umbraco.cms.businesslogic.cache.Cache.GetCacheItem(String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) +159
       umbraco.macro.GetXsltExtensions() +253
       umbraco.macro.AddXsltExtensionsToHeader(String xslt) +197
       umbraco.XsltTasks.Save() +660
       umbraco.presentation.create.dialogHandler_temp.Create(String NodeType, Int32 TypeId, Int32 NodeId, String Text) +755
       umbraco.presentation.create.xslt.sbmt_Click(Object sender, EventArgs e) +257
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707
    



    Version Information: Micro

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 29, 2011 @ 14:05
    Tom Fulton
    0

    Hi,

    Check out this thread for a fix to that error:  http://our.umbraco.org/forum/developers/xslt/19383-referencing-catcha-dll-breaks-xslt

    I think you must have the Recaptcha DLL in your /bin/ somewhere, maybe from the Contour Contrib package?

    -Tom

  • Ben Norman 167 posts 276 karma points
    Feb 24, 2012 @ 00:31
    Ben Norman
    1

    Okey Dokey,

    I hit this error on .net 4 running Umbraco 4.7.1.1.

    This is the full runtime node so you can get a bit more context but I only had to add the last dependentAssembly node and it was fixed.

      <runtime>
        <!-- Old asp.net ajax assembly bindings -->
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="1.0.0.0" newVersion="3.0.0.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>

    Cheers

Please Sign in or register to post replies

Write your reply to:

Draft