I sometimes get "Cannot bind source content type Umbraco.Web.PublishedContentModels.BlogPost to model content type Umbraco.Web.PublishedContentModels.BlogPost. Both view and content models are PureLive, with same version. The application is in an unstable state and should be restarted." exception when I go to Blog posts page or Blog page. In this exception both view and content models are the same.
I clear cache by click on Republish entire site and save related Document Types and Templates to Blog and BlogPosts, but I sometimes get this exception again.
What is the problem? How can I solve this boring exception?
I believe you have switched from PureLive to AppData/Dll mode for Models Builder.
This will leave some files in the App_Data directory (I'm sorry I can't recall the exact path). I think they are called something like all.generated.cs or something similar to that. You will need to delete that file if it's present and then try again.
The error is telling you that the model existings in two locations and it doesn't know which to use.
I deleted all.generated.cs and model.generated.cs files in App_Data/Models folder and switched from PureLive to AppData and push Generate models button in developer section. After that models generated in App_Data/Models, but an exception occured when I run my site. exception is "The type or namespace name 'Home' does not exist in the namespace 'Umbraco.Web.PublishedContentModels' (are you missing an assembly reference?)'".
Please see this image:
What is the problem? How can I solve this exception?
Cannot bind source content type Umbraco content model to view model
Hi every one!
I use Umbraco 7.9.2. I implemented a Blog page and some Blog Posts in it by create child nodes in Blog page.
This is Blog Posts template:
And this is Blog template:
And this is MasterPage template:
I sometimes get "Cannot bind source content type Umbraco.Web.PublishedContentModels.BlogPost to model content type Umbraco.Web.PublishedContentModels.BlogPost. Both view and content models are PureLive, with same version. The application is in an unstable state and should be restarted." exception when I go to Blog posts page or Blog page. In this exception both view and content models are the same.
I clear cache by click on Republish entire site and save related Document Types and Templates to Blog and BlogPosts, but I sometimes get this exception again.
What is the problem? How can I solve this boring exception?
With thanks.
Hi Hassan,
I believe you have switched from PureLive to AppData/Dll mode for Models Builder.
This will leave some files in the App_Data directory (I'm sorry I can't recall the exact path). I think they are called something like
all.generated.cs
or something similar to that. You will need to delete that file if it's present and then try again.The error is telling you that the model existings in two locations and it doesn't know which to use.
Thanks
Nik
Hi Nik,
Thanks for your reply.
I deleted
all.generated.cs
andmodel.generated.cs
files inApp_Data/Models
folder and switched from PureLive to AppData and push Generate models button in developer section. After that models generated inApp_Data/Models
, but an exception occured when I run my site. exception is "The type or namespace name 'Home' does not exist in the namespace 'Umbraco.Web.PublishedContentModels' (are you missing an assembly reference?)'".Please see this image:
What is the problem? How can I solve this exception?
With thanks.
is working on a reply...