简体   繁体   English

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

[英]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.

相关问题 Viewengine是否不在asp.net mvc3升级中查看区域? - Viewengine not looking into areas for views in asp.net mvc3 upgrade? 无法找到请求的 .Net Framework 数据提供程序。 PostgreSQL 和 Mono - Unable to find the requested .Net Framework Data Provider. PostgreSQL and Mono MVC应用程序Viewengine不查看Areas / {name} / Views,而是查看默认的Views文件夹 - MVC application Viewengine not looking in Areas/{name}/Views instead looking in default Views folder 错误:无法找到 Mono。确保将 Mono 的“/bin”文件夹添加到环境的 PATH 变量中(在 MacOS 上) - Error: Unable to find Mono. Ensure that Mono's '/bin' folder is added to your environment's PATH variable (on MacOS) 如何修复 MVC 中的“AspNetCore.Views_Home_Index.ExecuteAsync()”NullReference 错误 - How to fix 'AspNetCore.Views_Home_Index.ExecuteAsync()' NullReference error in MVC 在Windows Phone的ListView中找不到选定的索引 - Unable to find selected index in ListView for windows phone MVC3视图无法找到添加的引用类 - MVC3 Views unable to find added referenced class 为什么浏览器无法找到我的视图,如何解决这个问题? - Why the browser is unable to find my views and how to resolve this issue? 我如何弄清楚为什么使用XSP和Monodevelop进行调试时找不到Views / Home / Index.cshtml? - How can I figure out why Views/Home/Index.cshtml Can't be found when debugging with XSP and Monodevelop? 在IIS中,Mono Views呈现(错误?)数字是可以的 - Mono Views rendering (errors?) numbers, in IIS is ok
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM