1

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 = "Config" }); 
tereško
  • 58,060
  • 25
  • 98
  • 150
Freshblood
  • 6,285
  • 10
  • 59
  • 96

1 Answers1

2

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

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964