Copied to clipboard

Flag this post as spam?

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


  • Mike Poole 53 posts 165 karma points
    Jun 25, 2018 @ 12:08
    Mike Poole
    0

    Upgrading gives parameterless constructor error

    I am upgrading my application from Umbraco v7.5.9 to 7.10.3 and after the upgrade, I now get the following error:

    [MissingMethodException: No parameterless constructor defined for this object.]
       System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
       System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +113
       System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +206
       System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
       System.Activator.CreateInstance(Type type) +11
       System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +55
    
    [InvalidOperationException: An error occurred when trying to create a controller of type...
    

    I've upgraded through NuGet and also been through the Umbraco upgrade screen when first running the project. What would now be causing this error?

  • Alex Brown 129 posts 620 karma points
    Jun 25, 2018 @ 14:05
    Alex Brown
    0

    When you upgraded Umbraco should have asked if you want to overwrite some files, did you select "No to all"?

    If no one comes up with a fix for this then I suggest reverting back to 7.5.9 and upgrading to each minor version then running the site to see if it works.

    E.g. 7.5.9 => 7.6.0 => 7.7.0 => etc.

    It's painful, I know. But upgrading can cause unexpected results.

  • Mike Poole 53 posts 165 karma points
    Jun 25, 2018 @ 14:12
    Mike Poole
    100

    Thanks Alex

    I did do "No to all" but it looks like this line crept into my web.config file

    <add key="owin:appStartup" value="UmbracoDefaultOwinStartup" />
    

    Removed it and all works OK now

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies