Server Error in '/' Application.

The model item passed into the dictionary is of type 'Dedoose.Web.Models.BlogViewModel', but this dictionary requires a model item of type 'Dedoose.Web.Models.BlogPostViewModel'.

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.InvalidOperationException: The model item passed into the dictionary is of type 'Dedoose.Web.Models.BlogViewModel', but this dictionary requires a model item of type 'Dedoose.Web.Models.BlogPostViewModel'.

Source Error:


Line 21:         <div id="belowHeader">
Line 22:             <div class="blogPosts">
Line 23:                 @{Html.RenderPartial("_BlogPost", Model.SelectedPost);}
Line 24:             </div>
Line 25:             <div class="blogCategories">

Source File: D:\IISRoot\DedooseWWW\Views\Blog\Post.cshtml    Line: 23

Stack Trace:


[InvalidOperationException: The model item passed into the dictionary is of type 'Dedoose.Web.Models.BlogViewModel', but this dictionary requires a model item of type 'Dedoose.Web.Models.BlogPostViewModel'.]
   System.Web.Mvc.ViewDataDictionary`1.SetModel(Object value) +195
   System.Web.Mvc.ViewDataDictionary..ctor(ViewDataDictionary dictionary) +147
   System.Web.Mvc.WebViewPage`1.SetViewData(ViewDataDictionary viewData) +78
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +139
   System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection) +390
   System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper htmlHelper, String partialViewName, Object model) +93
   ASP._Page_Views_Blog_Post_cshtml.Execute() in D:\IISRoot\DedooseWWW\Views\Blog\Post.cshtml:23
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +220
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +77
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +89
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +334
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +91
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +647
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +188
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +32
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +9
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +9
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +46
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +481
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +231
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4690.0