开发者

How can i route this url to right routing map?

localhost/myfile.xml This url is requested and i am trying to convert it to Home controller's Config action . My solution is at below but exception says routing can't include '/' character . How i can do this ?

    routes.MapRoute("config",
        "/crossdomain.xml",
        new {controller="Home",action = "Confi开发者_如何学Cg" }); 


Remove the leading slash; you don't need (and cannot have) it in a route.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜