I can see the appropriate HttpRequest in Fiddler but the Controller method is never invoked but the request seems to be intercepted and a 404 is returned. Other controller methods are invoked appropriately.
HttpRequest
GET http://localhost:36696/test/file/69946/FF47F87FE63E6C24644631FAEA15B157/file.pdf HTTP/1.1
Host: localhost:36696
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,sv;q=0.6
Controller method
[Route("test/file/{fileId:int}/{hash}/file.pdf")]
public HttpResponseMessage GetFile(int fileId, string hash)
{
[..]
}
Questions;
How do I properly set the Route (
System.Web.HttpRouteAttribute) with embedded parameters?Is there any default filter prohibiting me from accessing PDF files? This is in IIS Express (VS2013)
I cannot post the entire web.config for privacy concerns but there are no httpHandlers or mimeType entries in the file.