我在 Global.asax.cs 中定义了以下路由:
void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
// catalog
routes.MapRoute("thumbs", "Thumbnail/{extn}/{image}/{width}/{height}", new
{
controller = "Image",
action = "FetchThumbnail",
extn = "gif",
image = MediaManager.DefaultImageGuid,
width = 250,
height = 200
});
routes.MapRoute("rfqlist", "Rfqs/", new { controller = "RfqList", action = "Index" });
routes.MapRoute("TappDefault", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
我无法通过并看到他们正在注册。我有一个控制器:
public class RfqListController : TappController
public ActionResult Index(string rfqTitle, int? page)
如果我打电话
> https://localhost:44300/rfqlist
它会触发,但如果我打电话:
> https://localhost:44300/rfqs
它是 404s。我看不到我做错了什么。这通常很容易。