1
我有問題與asp mvc 3應用程序。當我把+
字符放在一個網址中時,我總是得到一個404錯誤。所有請求都是ajax獲取請求。asp mvc 404當+在url
如果我提出這個要求測試/詳細信息/ +我得到404:測試/詳細信息/ +
這是請求小提琴手:GET /Test%2FDetails%2F%2B?t=1318678807718 HTTP/1.1
這裏有路線。
routes.MapRoute(
"PagingTwoTest", // Route name
"{controller}/{action}/{tag}/p{currentPage}/p{secCurrentPage}/{*term}", // URL with parameters
new { secCurrentPage = UrlParameter.Optional, term = UrlParameter.Optional }, // Parameter defaults
new { currentPage = "\\d+", secCurrentPage = "\\d+" }
);
routes.MapRoute(
"PagingTwo", // Route name
"{controller}/{action}/p{currentPage}/p{secCurrentPage}/{*term}", // URL with parameters
new { secCurrentPage = UrlParameter.Optional, term = UrlParameter.Optional }, // Parameter defaults
new { currentPage = "\\d+", secCurrentPage = "\\d+" }
);
routes.MapRoute(
"Paging", // Route name
"{controller}/{action}/p{currentPage}/{*term}", // URL with parameters
new { term = UrlParameter.Optional }, // Parameter defaults
new { currentPage = "\\d+" }
);
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
routes.MapRoute(
"DefaultName", // Route name
"{controller}/{action}/{*id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);