当重定向到我的应用程序控制器并且动作名称被删除但查询字符串保持不变时 要求网址 http://example.com/Search/MyGResponse?guid=0136240964447518&UserId=PAYID-LTISIJQ9GD76314CR034732S&token=EC-6LN3872092121462M&PayerID=LGRA7HD7VFXHC
下面是为路由公共静态空而编写的代码
RegisterRoutes(RouteCollection routes)
{ routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
routes.IgnoreRoute("{controller}/undefined");
// BotDetect requests must not be routed
routes.IgnoreRoute("{*botdetect}",
new { botdetect = @"(.*)BotDetectCaptcha\.ashx" });
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
}
感谢您的帮助。