I have following route config:
routes.MapRoute(
name: "Downloads",
url: "downloads/{filename}",
defaults: new { controller = "Downloads", action = "Index", filename = UrlParameter.Optional }
);
and following controller code:
public ActionResult Index(string filename)
{ ...
When I call this Action with http://test.com/downloads/test.txt I get a 404. When I call the Action without dots in the filename it works. How can I make MVC pass full filenames to my parameter filename?