Copied to clipboard

Flag this post as spam?

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


  • Nic Wise 51 posts 85 karma points
    Nov 16, 2011 @ 18:47
    Nic Wise
    1

    Courier 2.5 issue with Castle Dynamic Proxy

    Hi there

    I've deployed Courier 2.5 on our dev and uat servers, and while most things are working fine, both serves are now very slow.

    Adding umbDebugshowTrace onto the URL shows that there is an issue with Castle. The Stackdump etc is below, but it can't load Castle.DynamicProxy2

    We dont use Caste in our own stuff. From the dates, Courier2.5 updated Caste.Core, but not Castle.DynamicProxy2. So DynamicProxy is looking for v1.1 of Castle.Core, but only finding v2.something.

    Ah yes. DLL hell.

    Any ideas? We are otherwise running 4.7.1, with very little added on the top.

    OK, UPDATE:  I'll keep this here. I removed Castle.DymanicProxy2 and... the error goes away. No idea if it's broken something, and I'll have more of a play tomorrow, but.... very strange.

    ------------------

    RazorDataTypeModelTypes cache is empty, populating cache using TypeFinder... 1.776741 0.000042

    Exception occurred while populating cache, Will set RazorDataTypeModelTypes to null so that this error remains visible and you don't end up with an empty cache with silent failure. 1.802134 0.025393

    The exception was System.Exception and the message was Unable to load one or more of the types in assembly 'Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'. Exceptions were thrown:

    System.IO.FileLoadException: Could not load file or assembly 'Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    System.IO.FileLoadException: Could not load file or assembly 'Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' 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.MacroEngines.DynamicNode.TryGetMember(GetMemberBinder binder, Object& result)

     

  • Per Ploug 865 posts 3476 karma points MVP admin
    Nov 17, 2011 @ 09:15
    Per Ploug
    1

    Hi Nic

    The issue releates to Nhibernate and Fluent Nhibernate, they updated their assemblies, but removed the Castle.DynamicProxy2 dependency, so it's not a needed part of fluent nHibernate anymore. 

    Which is also why Castle.DynamicProxy2 is not part of the Courier package anymore, but if you already had it in /bin (from Courier 2.0 or from somewhere else) then yup it will break, which is also mentioned in the Install and config docs:

    http://nightly.umbraco.org/UmbracoCourier/Installation%20and%20Configuration.pdf

    /Per

  • Nic Wise 51 posts 85 karma points
    Nov 17, 2011 @ 10:06
    Nic Wise
    0

    Documentation? Who reads documentation!? ;-)

    Thanks - glad it was such an easy fix.

    (/me goes off to read the docs)

    Thanks Per. Hopefully, with this here, if someone else has the error, they'll be able to fix it quickly, too.

  • Drew 165 posts 339 karma points
    Dec 07, 2011 @ 12:04
    Drew
    0

    We previously used the original, very early version of Courier but removed it due to a few conflicts. When we removed it, we left in the Castle.DynamicProxy2 dll, as we weren't sure if this was part of the core.

    So when upgrading to 2.5, we got the same error as Nic - simply resolved by deleting the DLL (as per documentation - which I missed!).

    This thread helped me find the solution quickly! :)

     

    Cheers guys,

Please Sign in or register to post replies

Write your reply to:

Draft