Mono:ViewEngine 无法在 ~/Views/Home/ 中找到索引

ink*_*eta 5 c# asp.net-mvc mono

我目前正在将 ASP.NET MVC 4 与 Nginx 服务器和 fastcgi-mono-server4 结合使用。尝试任何视图后,我得到:

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 
Run Code Online (Sandbox Code Playgroud)

不过,我想指出它可以在 IIS 上本地运行。此外,我检查了所有内容都已部署并重新启动了服务器,但此错误仍然存​​在。有什么帮助吗?

小智 0

我相信 NGINX 中的文件路径区分大小写,与 IIS 不同。