视图“索引”或它的主人没有被发现。 [英] The view 'Index' or its master was not found.

查看:139
本文介绍了视图“索引”或它的主人没有被发现。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

The view 'Index' or its master was not found. The following locations were searched:
~/Views/ControllerName/Index.aspx
~/Views/ControllerName/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx

我使用ASP.Net MVC区域时得到这个错误。该区域控制器动作被调用,但它似乎寻找在'基地'项目视图的视图,而不是在地区查看文件夹中。

I got this error when using ASP.Net mvc area. The area controller action are invoked, but it seems to look for the view in the 'base' project views instead of in the area views folder.

推荐答案

问题是,我用 MvcRoute.MappUrl MvcContrib 来路由 context.Routes

The problem was that I used MvcRoute.MappUrl from MvcContrib to route the context.Routes.

似乎 MvcContrib 路由映射器与区域的路由不舒服。

It seems that MvcContrib routing mapper was uncomfortable with area routing.

这篇关于视图“索引”或它的主人没有被发现。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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