我把Controllers和 Model从WEB那里分离出来,单独建了一项目。
如图
Controllers的命名空间为JinLinERP.Controllers
我在Global.asax的MapRoute也加入了这个命名空间
如图
为啥还出现下面这个问题。
“/”应用程序中的服务器错误。
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
怎样解决~~