我在我的MVC應用程序了以下路線:複雜的MVC路線
routes.MapRoute(
name: "Default",
url: "api/{server}/{port}/{route}",
defaults: new {
controller = "Home",
action = "Index",
server = UrlParameter.Optional,
port = UrlParameter.Optional,
route = UrlParameter.Optional }
);
當URL是http://localhost:80/api/myserver.mydomain.net/8080/mypage
這條路線被擊中,但是當我改變的URL http://localhost:80/api/myserver.mydomain.svc/8080/mypage
路線突然不受到打擊。任何想法,爲什麼簡單地將我的路線中的參數從'.net'更改爲'.svc'會停止工作?
我想你可能是對的東西與ISAPI篩選器,遺憾的是沒有任何的建議,上述問題迎刃而解。 – 2014-09-29 12:33:06