Cannot bind source type to model type Umbraco.Cms.Core.Models.PublishedContent.IPublishedContent

I keep getting below error while trying to bind a custom model to the view. I did the route hijacking using RenderController and then in the action method, I am trying to return a custom model to the view. It gives below error. It gets resolved when I remove the Layout page reference from the view. But shows up when layout is included in the view.

ModelBindingException: Cannot bind source type WMDCExternalSitesBase.Core.Models.ComposedPageViewModel`2[[Umbraco.Cms.Web.Common.PublishedModels.Search, WMDCExternalSitesBase.Models, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[WMDCExternalSitesBase.Core.Models.SearchResultModel, WMDCExternalSitesBase.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] to model type Umbraco.Cms.Core.Models.PublishedContent.IPublishedContent.


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/108475-cannot-bind-source-type-to-model-type-umbracocmscoremodelspublishedcontentipublishedcontent