Copied to clipboard

Flag this post as spam?

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


  • Simon 692 posts 1068 karma points
    Dec 22, 2016 @ 09:26
    Simon
    0

    Upgrading Umbraco 7.5.3 to Umbraco 7.5.6 - Error

    Hi Guys,

    I am trying to upgrading to 7.5.6 through nuget.

    Now, when trying to access the site, the following error is being thrown:

    No parameterless constructor defined for this object.
    
    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.MissingMethodException: No parameterless constructor defined for this object.
    
    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: 
    
    
    [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) +114
       System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
       System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
       System.Activator.CreateInstance(Type type) +11
       System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +110
    
    [InvalidOperationException: An error occurred when trying to create a controller of type 'CSTemplate.Controllers.HomePageController'. Make sure that the controller has a parameterless public constructor.]
       System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +247
       System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +437
       Umbraco.Web.Mvc.OverridenDefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +44
       Umbraco.Web.Mvc.UmbracoControllerFactory.CreateController(RequestContext requestContext, String controllerName) +185
       Umbraco.Web.Mvc.RenderControllerFactory.CreateController(RequestContext requestContext, String controllerName) +58
       Umbraco.Web.Mvc.MasterControllerFactory.CreateController(RequestContext requestContext, String controllerName) +236
       System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +328
       System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +157
       System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +88
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +50
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +103
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
    

    I don't know if something related to Simple-injector since I am using Simple Injector for Dependency Injection.

    I have also updated SimpleInjector but the same error is being thrown.

    The CMS area is working fine.

    Any help would be much appreciated.

    Kind Regards

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Dec 22, 2016 @ 09:58
    Jeroen Breuer
    0

    In Umbraco 7.5.4 Automapper was updated. This resulted in some errors we had with DI. Maybe these issues can help:

    http://issues.umbraco.org/issue/U4-8984

    http://issues.umbraco.org/issue/U4-9109

    Jeroen

  • Simon 692 posts 1068 karma points
    Dec 22, 2016 @ 10:08
    Simon
    0

    Maybe I can Update the Automapper?

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Dec 22, 2016 @ 10:17
    Jeroen Breuer
    0

    Automapper is already updated by upgrading from Umbraco 7.5.3 to 7.5.6. But maybe you need to change something in your DI setup.

    Jeroen

  • Simon 692 posts 1068 karma points
    Jan 17, 2017 @ 10:39
    Simon
    100

    Ok Solved now. It was actually a fault from my side, because the Global.asax where changed/modified and the initialization of the SimpleInjector was not being triggered.

    So guys, after you update, make sure that you check your Global.asax

    Thanks anyway for your help Jeroen and Cheers.

  • 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