开发者社区> 问答> 正文

部署到Azure后无法将源内容类型Umbraco.Web.PublishedCache.NuCach

我已经建立了一个站点,并且在本地都可以正常运行。我刚刚将站点部署到Azure,并使用SSMS的“将数据库部署到Microsoft Azure SQL数据库”功能发布了数据库。两者均成功完成。我可以登录umbraco并查看我在Azure站点上本地拥有的所有内容,但是当我尝试访问主页时,我得到一个YSOD并显示以下错误。

我可以登录CMS并查看我的所有内容。

发生了什么?我想念什么?

错误:

Server Error in '/' Application.
Cannot bind source content type Umbraco.Web.PublishedCache.NuCache.PublishedContent to model type Foo.PublishedContentModels.Home.
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.PublishedCache.NuCache.PublishedContent to model type Foo.PublishedContentModels.Home.

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:


[ModelBindingException: Cannot bind source content type Umbraco.Web.PublishedCache.NuCache.PublishedContent to model type Foo.PublishedContentModels.Home.]
   Umbraco.Web.Mvc.ContentModelBinder.ThrowModelBindingException(Boolean sourceContent, Boolean modelContent, Type sourceType, Type modelType) in D:\a\1\s\src\Umbraco.Web\Mvc\ContentModelBinder.cs:159
   Umbraco.Web.Mvc.ContentModelBinder.BindModel(Object source, Type modelType) in D:\a\1\s\src\Umbraco.Web\Mvc\ContentModelBinder.cs:94
   Umbraco.Web.Mvc.UmbracoViewPage`1.SetViewData(ViewDataDictionary viewData) in D:\a\1\s\src\Umbraco.Web\Mvc\UmbracoViewPageOfTModel.cs:152
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +99
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
   Umbraco.Web.Mvc.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in D:\a\1\s\src\Umbraco.Web\Mvc\ProfilingView.cs:25
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13

展开
收起
几许相思几点泪 2019-12-17 18:06:09 698 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
Web应用系统性能优化 立即下载
高性能Web架构之缓存体系 立即下载
PWA:移动Web的现在与未来 立即下载