Copied to clipboard

Flag this post as spam?

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


  • Jon 47 posts 290 karma points
    Jul 19, 2016 @ 14:40
    Jon
    0

    Very slow first visit and crashes sometimes

    Hi

    Im having problems with very slow first visits and the site also crashes now and then...

    It says:

    Cannot bind source content type Umbraco.Web.PublishedContentModels.Frontpage to model content type Umbraco.Web.PublishedContentModels.Master. Types come from two PureLive assemblies with different versions, this usually indicates that the application is in an unstable state. The application is restarting now, reload the page and it should work

    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: Umbraco.Web.Mvc.ModelBindingException: Cannot bind source content type Umbraco.Web.PublishedContentModels.Frontpage to model content type Umbraco.Web.PublishedContentModels.Master. Types come from two PureLive assemblies with different versions, this usually indicates that the application is in an unstable state. The application is restarting now, reload the page and it should work.

    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.
    

    ––

        [ModelBindingException: Cannot bind source content type Umbraco.Web.PublishedContentModels.Frontpage to model content type Umbraco.Web.PublishedContentModels.Master. Types come from two PureLive assemblies with different versions, this usually indicates that the application is in an unstable state. The application is restarting now, reload the page and it should work.]
       Umbraco.Web.Mvc.RenderModelBinder.ThrowModelBindingException(Boolean sourceContent, Boolean modelContent, Type sourceType, Type modelType) +639
       Umbraco.Web.Mvc.RenderModelBinder.BindModel(Object source, Type modelType, CultureInfo culture) +420
       Umbraco.Web.Mvc.UmbracoViewPage`1.SetViewData(ViewDataDictionary viewData) +180
       System.Web.Mvc.WebViewPage.ConfigurePage(WebPageBase parentPage) +57
       System.Web.WebPages.<>c__DisplayClass3.<RenderPageCore>b__2(TextWriter writer) +218
       System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10
       System.Web.WebPages.WebPageBase.Write(HelperResult result) +80
       System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +63
       System.Web.WebPages.WebPageBase.PopContext() +237
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +98
       System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +235
       System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +113
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +290
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +52
       System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +173
       System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100
       System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
       System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
       System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
       System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
       System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9744261
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
    

    ––

    Any ideas?

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 19, 2016 @ 15:29
    Alex Skrypnyk
    100

    Hi Jon,

    What Umbraco version are you using?

    Try to change MdelBuilder Mode to DLL in web.config:

      <add key="Umbraco.ModelsBuilder.ModelsMode" value="Dll" />
    

    Thanks,

    Alex

  • Jon 47 posts 290 karma points
    Jul 20, 2016 @ 08:48
    Jon
    0

    It comes up with a new error with "Dll"

    Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0234: The type or namespace name 'Frontpage' does not exist in the namespace 'Umbraco.Web.PublishedContentModels' (are you missing an assembly reference?)

    Source Error:

    Line 40:     
    Line 41:     
    Line 42:     public class _Page_Views_Frontpage_cshtml : Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.Frontpage> {
    Line 43:         
    Line 44: #line hidden
    
  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 20, 2016 @ 08:50
    Alex Skrypnyk
    0

    Jon, try to rebuild models manually, go to Developers Section -> Models Builder tab and press Generate Models button.

    Thanks,

    Alex

  • Jon 47 posts 290 karma points
    Jul 20, 2016 @ 08:49
    Jon
    0

    Umbraco version 7.4.3 assembly: 1.0.5948.18141

  • Jon 47 posts 290 karma points
    Jul 20, 2016 @ 10:32
    Jon
    0

    Brilliant! It seems like that was the trick :-)

    Thanks!
    
  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 20, 2016 @ 10:32
    Alex Skrypnyk
    0

    You are welcome ! Great that we found the solution !

  • Jon 47 posts 290 karma points
    Jul 20, 2016 @ 10:33
    Jon
    0

    ...of curiosity; Why change was it necessary to change the modelBuilder?

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 20, 2016 @ 12:20
    Alex Skrypnyk
    1

    It goes like this: Dll models generate a DLL when a button is clicked... LiveDll models are generated whenever content types change, but this causes an application restart... and then there is "PureLive" which sort-of is "live" without the restart--but with some restrictions, such as models being visible only in views.

    So PureLive makes some problems sometimes, but it's default state.

    Thanks,

    Alex

  • Chris Clancy 64 posts 133 karma points
    Nov 30, 2016 @ 10:30
    Chris Clancy
    0

    This is a great explanation Alex. I had a site setup with PureLive but in Visual Studio I was seeing messages complaining about missing references, although the site was working as expected.

    I have changed ModelsBuilder to Dll and rebuilt the models in the back office and everything runs ok, with no more error messages in VS. I can't say I've noticed a huge improvement in speed but there should be no more of the 'your app may be unstable' messages appearing.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Nov 30, 2016 @ 23:02
    Alex Skrypnyk
    1

    Hi Chris,

    You will not have significant performance changes when classes are in dll or internal memory. But definitely locally it's better to work in Dll mode, because of an issue with visual studio.

    Another possible way to work with strongly typed classes - AppData Models, read more about this setting - https://github.com/zpqrtbnk/Zbu.ModelsBuilder/wiki/Builder-Modes

    In two words - you have classes generated under AppData folder, just include them to project and you have visual studio support. The nice feature is that you do not have to rebuild site when change some docType.

    I hope it will help you/

    Thanks,

    Alex

  • Chris Clancy 64 posts 133 karma points
    Dec 01, 2016 @ 11:32
    Chris Clancy
    0

    Thanks for the link Alex. Very useful.

Please Sign in or register to post replies

Write your reply to:

Draft