首页 新闻 赞助 找找看

asp.net mvc 首页 传入的请求不与任何路由匹配

0
悬赏园豆:20 [已关闭问题]

http://localhost/User.ashx/Index 可以正常进行访问

http://localhost/他就会提示 传入的请求不与任何路由匹配

请问如何解决

问题补充: 使用的是虚拟空间 public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}.ashx/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } 其他的还需要配置什么,试了很多方法还是http://localhost/ 请求不与任何路由匹配 http://localhost/User.ashx/Index这个就可以正常访问
程序小强的主页 程序小强 | 初学一级 | 园豆:0
提问于:2009-07-13 16:05
< >
分享
其他回答(1)
0

请到这里看看

http://www.asp.net/learn/mvc/#MVC_Controllers

有关 Application_Start()中RegisterRoutes(RouteTable.Routes)的示例

或google中搜索The incoming request does not match any route

http://www.google.cn/search?hl=zh-CN&newwindow=1&q=The+incoming+request+does+not+match+any+route&btnG=Google+%E6%90%9C%E7%B4%A2


 

邀月 | 园豆:25475 (高人七级) | 2009-07-14 08:11
0

再写个路由

慧☆星 | 园豆:5640 (大侠五级) | 2011-10-12 09:24
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册