c# - Orchard Shape 类型 ResizeMediaUrl 未找到异常,MediaLibrary 组件不工作

标签 c# .net asp.net-mvc orchardcms orchardcms-1.7

我创建了一个内容类型和一个投影来查看该内容类型,但在尝试访问投影时出现以下异常:

Server Error in '/' Application.

Shape type ResizeMediaUrl not found

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: Orchard.OrchardException: Shape type ResizeMediaUrl not found

Source Error: 


Line 3:  @{
Line 4:      ImagePart imagePart = Model.ContentPart;
Line 5:      var mediaPart = ((ContentItem)Model.ContentItem).As<MediaPart>();
Line 6:  }           
Line 7:  

Source File: c:\inetpub\wwwroot\Staging\Themes\BodyLogicMD\Views\Parts.Image.Summary-Image.cshtml    Line: 5 

媒体库在测试性能时被禁用和启用了几次,但现在它和它的所有依赖模块都被启用了。该网站也在服务器内从一个位置移动到另一个位置,但媒体文件夹及其结构在同一个 orchard 结构中。

当禁用媒体库模块时,会显示投影,但不会显示与之关联的图片。启用时会出现上述异常。

请指教,

谢谢,

亚历克斯。

最佳答案

这里...

https://stackoverflow.com/a/28671852/1814343

这就是将 Media 部分 附加到您的内容类型,并将其 Stereotype 设置为 Media

关于c# - Orchard Shape 类型 ResizeMediaUrl 未找到异常,MediaLibrary 组件不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20250562/

相关文章:

c# - 按字母顺序排列,Array.Sort() 效果不佳

c# - 我怎么知道使用了默认值?

asp.net-mvc - MVC调用Html.Action在区域内?

c# - Access sql 以使用自动编号创建表

c# - Entity Framework 6 和具有架构名称的存储过程

c# - 如何从 Postman 获取表单数据到 WebApi

.net - 加载大量数据(40 列,2000 行)时,WPF 网格滚动缓慢且卡顿

c# - 使用 EPPlus 验证 Excel(电子表格)文件

c# 属性和覆盖行为 asp.net mvc

c# - 如何从 Windows 服务运行 excel vba 代码