Copied to clipboard

Flag this post as spam?

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


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Annejan 3 posts 23 karma points
    Mar 26, 2012 @ 21:11
    Annejan
    0

    TypeLoadException after upgrade to 2.5.1.0

    Hi all,

    Some time ago I started developing a webshop using Umbraco 4.5.2 and uCommerce 1.5. Now I want to perform an upgrade to version 2.5.1.0. De package installs successfully, but the shop is broken after the upgrade. I can browse for products (using some XSLT and some .NET custom controls), but the following .NET method call fails:

    Library.AddToBasket(CatalogName, amount, Product.Sku);

    In the Event Log, a TypeLoadException is logged: Could not load type 'UCommerce.Security.ISecurityService' from assembly 'UCommerce, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

    Quite weird, because as far as Reflector tells me, neither the old nor the new version of the DLL ever contained such a type... The full details, including stacktrace, are as follows:

    Exception type: TypeLoadException
    Exception message: Could not load type 'UCommerce.Security.ISecurityService' from assembly 'UCommerce, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    at System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
    at System.Signature..ctor(IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
    at System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
    at System.Reflection.RuntimeConstructorInfo.GetParameters()
    at Castle.MicroKernel.ModelBuilder.Inspectors.ConstructorDependenciesModelInspector.CreateConstructorCandidate(ComponentModel model, ConstructorInfo constructor)
    at Castle.MicroKernel.ModelBuilder.Inspectors.ConstructorDependenciesModelInspector.ProcessModel(IKernel kernel, ComponentModel model)
    at Castle.MicroKernel.ModelBuilder.DefaultComponentModelBuilder.BuildModel(String key, Type service, Type classType, IDictionary extendedProperties)
    at Castle.MicroKernel.Registration.ComponentRegistration`1.Castle.MicroKernel.Registration.IRegistration.Register(IKernel kernel)
    at Castle.MicroKernel.DefaultKernel.Register(IRegistration[] registrations)
    at Castle.Windsor.WindsorContainer.Register(IRegistration[] registrations)
    at Castle.Windsor.Installer.DefaultComponentInstaller.SetUpComponents(IConfiguration[] configurations, IWindsorContainer container, IConversionManager converter)
    at Castle.Windsor.Installer.DefaultComponentInstaller.SetUp(IWindsorContainer container, IConfigurationStore store)
    at Castle.Windsor.WindsorContainer.RunInstaller()
    at Castle.Windsor.WindsorContainer..ctor(IConfigurationInterpreter interpreter)
    at Castle.Windsor.WindsorContainer..ctor(String xmlFile)
    at UCommerce.Infrastructure.ObjectFactory.GetContainer(CommerceConfigurationProvider commerceConfiguration)
    at UCommerce.Infrastructure.ObjectFactory.get_Container()
    at UCommerce.Infrastructure.ObjectFactory.Resolve[T]()
    at UCommerce.Xslt.XsltLibrary.get_InProductCatalogGroupContext()
    at UCommerce.Xslt.TransactionLibrary.AddToBasket(String catalogName, Int32 quantity, String sku, String variantSku, Boolean addToExistingLine)
    at UCommerce.Xslt.Library.<>c__DisplayClass2e.<AddToBasket>b__2d()
    at UCommerce.Xslt.Library.HandledCall[T](Func`1 method)
    at UCommerce.Xslt.Library.AddToBasket(String catalogName, Int32 quantity, String sku)
    at LWC.Webshop.Controls.ProductPane.AddProductToBasket(Int32 amount)
    at LWC.Webshop.Controls.ProductPane.ProcessOrderRequest()
    at LWC.Webshop.Controls.ProductPane.OnLoad(EventArgs e)
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    The stack frames in the namespace LWC is my custom code.

    Really hope someone can shed some light on this. Thanks in advance!

  • Annejan 3 posts 23 karma points
    Mar 26, 2012 @ 22:20
    Annejan
    0

    Hmm, found the problem... It appeared that the old UCommerce.dll somehow wasn't replaced with the new one... That also explains why I found that ISecurityService does not exist in the new DLL.

    I'm still not entirely out of the woods yet, but especially this one had me cracking my head for several hours.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 29, 2012 @ 15:14
    Søren Spelling Lund
    0

    Sorry for the inconvenience. The DLL might have been in use when Umbraco tried overwriting the existing DLL with the new version.

    Do let me know if I can help in any way with the rest of the process.

  • Annejan 3 posts 23 karma points
    Mar 29, 2012 @ 22:05
    Annejan
    0

    No problem; stuff happens ;). And the rest of the issues were really minor thingies that I figured out in no time.

    Must say I really like (Umbraco and) uCommerce and it flexibility. And with uCommerce offering a free edition, I think this is a killer combo.

    The only concern I have is with certain security-related aspects. Umbraco (at least the version I'm currently using) comes with several standard ASP.NET security measures disabled or not configured by default, while enabling and/or configuring them does not seem to break anything in a standard install. I've also noticed that previous versions of uCommerce do not work in Medium trust. Haven't tried it with the latest, but the changelog did not mention anything about a change here. Are there any plans to enable this in the future?

    I'm a dev specialized in application security so I'm probably kind of a nitpick here, but I feel that a platform suitable for relatively inexperienced users should be secure by default.

    But other than these concerns: thanks for all the great work!

  • Søren Spelling Lund 1797 posts 2786 karma points
    Apr 24, 2012 @ 08:00
    Søren Spelling Lund
    0

    While FullTrust isn't an absolute requirement we decided to go with it anyway because it allows for some of the lower level components we rely on to do performance optimization tricks.

Please Sign in or register to post replies

Write your reply to:

Draft