间歇性找不到 Sitecore 渲染
Sitecore rendering not found intermittently
我们有一个页面,上面有各种效果图。此页面间歇性加载正常。有一天它会毫无问题地工作,而另一天它会完全停止工作。当它完全停止工作时,问题是
Exception: System.InvalidOperationException
Message: The view 'renderingname.cshtml' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/News/renderingname.aspx
~/Views/News/renderingname.ascx
~/Views/Shared/renderingname.aspx
~/Views/Shared/renderingname.ascx
~/Views/News/renderingname.cshtml
~/Views/News/renderingname.vbhtml
~/Views/Shared/renderingname.cshtml
~/Views/Shared/renderingname.vbhtml
在OOTB路由之前已经正确注册路由。页面上的其他视图从来没有这个问题,它们位于与 renderingname.cshtml 相同的目录中。
这是控制器代码运行这个组件没有型号代码-
public ActionResult GetComponent()
{
//code to populate the model
return View("renderingname", model);
}
关于如何解决这个问题有什么想法吗?
提供渲染的完整路径:
public ActionResult GetComponent()
{
//code to populate the model
return View("~/Views/Your_View_Folder/renderingname.cshtml",model);
}
我们有一个页面,上面有各种效果图。此页面间歇性加载正常。有一天它会毫无问题地工作,而另一天它会完全停止工作。当它完全停止工作时,问题是
Exception: System.InvalidOperationException
Message: The view 'renderingname.cshtml' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/News/renderingname.aspx
~/Views/News/renderingname.ascx
~/Views/Shared/renderingname.aspx
~/Views/Shared/renderingname.ascx
~/Views/News/renderingname.cshtml
~/Views/News/renderingname.vbhtml
~/Views/Shared/renderingname.cshtml
~/Views/Shared/renderingname.vbhtml
在OOTB路由之前已经正确注册路由。页面上的其他视图从来没有这个问题,它们位于与 renderingname.cshtml 相同的目录中。
这是控制器代码运行这个组件没有型号代码-
public ActionResult GetComponent()
{
//code to populate the model
return View("renderingname", model);
}
关于如何解决这个问题有什么想法吗?
提供渲染的完整路径:
public ActionResult GetComponent()
{
//code to populate the model
return View("~/Views/Your_View_Folder/renderingname.cshtml",model);
}