File path as parameter in ASP.NET Web API

Topics: ASP.NET Web API
Nov 17, 2014 at 4:43 PM
I need to pass file path as parameter value for below parameters {inputFile} and {ConfigRootDir}. Due of "\" slash character in the parameter, web API is erroring out with 404 error. How to pass file path as a parameter in ASP.NET Web API?

This is my Route:
public static void Register(HttpConfiguration config)
{
    config.Routes.MapHttpRoute(
            name: "DefaultApi",
            routeTemplate: "api/{controller}/{inputFile},{templateName},{ConfigRootDir}",
    );
}