I've got a route that should only ever called by an automated process:
routes.MapRoute(
"Automated file processing",
"Process/{change}/{file}/{type}",
new { controller = "C", action = "Process" }
);
Where both the file
and type
are optional parameters. Ideally, I'd like to be able to call
/Process/Created/Filename/Text (with file and type)
/Process/DirectoryListing//Text (with type only)
/Process/Created/Filename/ (with file only)
How would you acheive that optional parameter in the middle? With the example route I showed, even if I add file = "", type = ""
to the route, I get:
HTTP Error 400 - Bad Request.