[英]Mono: ViewEngine unable to find Index in ~/Views/Home/
I'm currently using ASP.NET MVC 4 in conjunction with an Nginx server and fastcgi-mono-server4.我目前正在将 ASP.NET MVC 4 与 Nginx 服务器和 fastcgi-mono-server4 结合使用。 After attempting to any Views, I get:
尝试任何视图后,我得到:
System.InvalidOperationException
The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/Index.aspx
~/Views/Home/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Web.Mvc.
Exception stack trace:
at System.Web.Mvc.ViewResult.FindView (System.Web.Mvc.ControllerContext context) [0x00000] in <filename unknown>:0
at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc.ControllerContext context) [0x00000] in <filename unknown>:0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x00000] in <filename unknown>:0
at System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17 () [0x00000] in <filename unknown>:0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter (IResultFilter filter, System.Web.Mvc.ResultExecutingContext preContext, System.Func`1 continuation) [0x00000] in <filename unknown>:0
However, I would like to note that it works locally on IIS. In addition, I checked that everything was being deployed and restarted the server but this error persists.但是,我想指出它在 IIS 本地工作。此外,我检查了一切都已部署并重新启动服务器,但此错误仍然存在。 Any help?
有什么帮助吗?
I believe file paths in NGINX are case-sensitive, unlike IIS.我相信 NGINX 中的文件路径区分大小写,这与 IIS 不同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.