摘要: 摘要: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报错如下:Multiple types were found that match the controller named 'Home'. This can hap 阅读全文
posted @ 2013-05-23 23:50 赤狐(zcm123) 阅读(593) 评论(0) 推荐(0) 编辑
摘要: 找到多个与名为“Home”的控制器匹配的类型。如果为此请求(“{controller}/{action}/{id}”)提供服务的路由在搜索匹配此请求的控制器时没有指定命名空间,则会发生此情况。如果是这样,请通过调用含有“namespaces”参数的“MapRoute”方法的重载来注册此路由。”出现该问题的原因是在默认的Golbal.asax.cs文件中已经注册了默认路由 public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection rout 阅读全文
posted @ 2013-05-23 23:28 赤狐(zcm123) 阅读(202) 评论(0) 推荐(0) 编辑