首页 新闻 会员 周边

asp.net mvc2 运行出错

0
悬赏园豆:140 [已关闭问题] 关闭于 2010-06-10 15:30

我把Controllers和  Model从WEB那里分离出来,单独建了一项目。

如图

项目结构

Controllers的命名空间为JinLinERP.Controllers

我在Global.asax的MapRoute也加入了这个命名空间

如图global

为啥还出现下面这个问题。

“/”应用程序中的服务器错误。

Multiple types were found that match the controller named 'home'. This can happen if the route that services this request ('{controller}/{action}/{id}') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter.

The request for 'home' has found the following matching controllers:
JinLinERP.Controllers.HomeController
JinLinERP.Controllers.HomeController

怎样解决~~

 

阿松的主页 阿松 | 小虾三级 | 园豆:601
提问于:2010-05-29 12:41
< >
分享
所有回答(1)
0

把MvcApplication定义写在Controllers项目中,而不是现在Web项目中的Global.asax.cs中。

思益工作室 | 园豆:205 (菜鸟二级) | 2010-05-29 19:46
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册