单声道找不到视图“索引"或其主视图 [英] mono The view 'Index' or its master was not found

查看:151
本文介绍了单声道找不到视图“索引"或其主视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过本教程 http://www.davidloo.com/?p=479 我安装了monodevelop并创建了ASP.NET MVC项目. 但是当我运行F5时,我得到以下输出:

by this tutorial http://www.davidloo.com/?p=479 I installed monodevelop and created ASP.NET MVC project. but when I run F5 so I have this output:

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) [0x00092] in <filename unknown>:0 
  at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc.ControllerContext context) [0x00044] 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+<InvokeActionResultWithFilters>c__AnonStorey5.<>m__0 () [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter (IResultFilter filter, System.Web.Mvc.ResultExecutingContext preContext, System.Func`1 continuation) [0x00025] in <filename unknown>:0 

版本信息:4.2.1(稳定的4.2.1.102/6dd2d0d UTC 2015年11月12日星期四09:52:44); ASP.NET版本:4.0.30319.17020,由Mono提供支持

Version Information: 4.2.1 (Stable 4.2.1.102/6dd2d0d Thu Nov 12 09:52:44 UTC 2015); ASP.NET Version: 4.0.30319.17020 Powered by Mono

我在6.0版本中拥有的MonoDevelop

MonoDevelop I have in 6.0 version

和文件:Views/Home/Index.cshtml存在

And file: Views/Home/Index.cshtml exists

您知道有人错吗? 谢谢

Do you know anybody what can be wrong?? Thanks

推荐答案

当您的代码尝试产生真正的async执行时,所描述的异常会在mono中发生.

The described exception happens in mono when your code tries to produce really async execution.

Mono不支持async管道.

Mono does not support the async pipeline.

我向mono 发出拉动请求,如本GitHUB帖子中所述.它使异步Web API堆栈同步执行.

I make pull request for mono like described in this GitHUB post. It makes synchronous execution of asynchronous web API stack.

它是从以下SO问题得出的:

It is derived from these SO questions:

  • Mono .Net support for async await?
  • Mono with Owin Authentication
  • 404 response appended to webapi response
  • Mono: The view 'Index' or its master was not found

现在,您可以将async管道用于Mono的此修复程序.

Now you may use async pipeline with this fix for Mono.

这篇关于单声道找不到视图“索引"或其主视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆