{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/587","labels_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/587/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/587/comments","events_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/587/events","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/587","id":127098381,"number":587,"title":"404 error on certain route templates","user":{"login":"Hobart2967","id":1580879,"avatar_url":"https://avatars.githubusercontent.com/u/1580879?v=3","gravatar_id":"","url":"https://api.github.com/users/Hobart2967","html_url":"https://github.com/Hobart2967","followers_url":"https://api.github.com/users/Hobart2967/followers","following_url":"https://api.github.com/users/Hobart2967/following{/other_user}","gists_url":"https://api.github.com/users/Hobart2967/gists{/gist_id}","starred_url":"https://api.github.com/users/Hobart2967/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hobart2967/subscriptions","organizations_url":"https://api.github.com/users/Hobart2967/orgs","repos_url":"https://api.github.com/users/Hobart2967/repos","events_url":"https://api.github.com/users/Hobart2967/events{/privacy}","received_events_url":"https://api.github.com/users/Hobart2967/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-01-17T14:34:51Z","updated_at":"2016-01-19T05:43:45Z","closed_at":null,"body":"I've got the problem with the routing. I am using attribute routing. \r\n\r\nProblem is, when naming defining a route like this:\r\n\r\n        [HttpGet(\"get/{walkthroughid}\")]\r\n         public ResponseContainer<WalkthroughModel> GetWalkthrough(int walkthroughid)\r\n\r\n        [HttpGet(\"get/{walkthroughId}\")]\r\n         public ResponseContainer<WalkthroughModel> GetWalkthrough(int walkthroughId)\r\n\r\nRunning the webapi on a kestrel server, it returns a 404 on calling /api/walkthroughs/get/123, while having \r\n        [Route(\"api/[controller]\")]\r\n\r\ndefined on the controller. Renaming the route in the name or the parameter to for example [HttpGet(\"get/{walkthrougaId}\")] (so change the \"h\" to an \"a\") or [HttpGet(\"getItem/{walkthroughId}\")]\r\nit works fine.\r\n\r\nThis is the failing case on **kestrel**\r\n\r\n        01/17/2016 15:26:47 +01:00 [Information] Protocol: HTTP/1.1  Method: GET  ContentType:   ContentLength:   Scheme: http  Host: **:5001  PathBase:   Path: /api/walkthroughs/get/123  QueryString:\r\n        01/17/2016 15:26:47 +01:00 [Debug] The request path \"/api/walkthroughs/get/123\" does not match a supported file type\r\n        01/17/2016 15:26:47 +01:00 [Debug] Request successfully matched the route with name 'null' and template '\"api/Walkthroughs/get/{walkthroughid}\"'.\r\n        01/17/2016 15:26:47 +01:00 [Debug] No actions matched the current request\r\n        01/17/2016 15:26:47 +01:00 [Debug] Request did not match any routes.\r\n        01/17/2016 15:26:47 +01:00 [Information] Request finished in 0,0157ms 404\r\n\r\nThis is the working case on **weblistener**\r\n\r\n    2016-01-17 19:00:46.839 +01:00 [Debug] Method: GET  PathBase:   Path: /api/walkthroughs/get/1313  Query:   Protocol: HTTP/1.1  Headers: Microsoft.Net.Http.Server.HeadersLogStructure\r\n    dnx.exe Information: 0 : 2016-01-17 19:00:46.843 +01:00 [Information] Protocol: HTTP/1.1  Method: GET  ContentType:   ContentLength:   Scheme: http  Host: marco-pc:5000  PathBase:   Path: /api/walkthroughs/get/1313  QueryString:\r\n    2016-01-17 19:00:46.847 +01:00 [Debug] The request path \"/api/walkthroughs/get/1313\" does not match a supported file type\r\n    2016-01-17 19:00:46.848 +01:00 [Debug] Request successfully matched the route with name 'null' and template '\"api/Walkthroughs/get/{walkthroughid}\"'.\r\n    2016-01-17 19:00:46.849 +01:00 [Debug] Executing action \"avsn.api.Controllers.WalkthroughsController.GetWalkthrough\"\r\n    dnx.exe Information: 0 : 2016-01-17 19:00:46.885 +01:00 [Information] Executing action method \"avsn.api.Controllers.WalkthroughsController.GetWalkthrough\" with arguments ([\"1313\"]) - ModelState is Valid'\r\n    2016-01-17 19:00:51.558 +01:00 [Debug] Executed action method \"avsn.api.Controllers.WalkthroughsController.GetWalkthrough\", returned result \"Microsoft.AspNet.Mvc.ObjectResult\".'\r\n    2016-01-17 19:00:51.576 +01:00 [Debug] No information found on request to perform content negotiation.\r\n    2016-01-17 19:00:51.580 +01:00 [Debug] Selected output formatter '\"Microsoft.AspNet.Mvc.Formatters.JsonOutputFormatter\"' and content type '\"application/json\"' to write the response.\r\n    dnx.exe Information: 0 : 2016-01-17 19:00:51.582 +01:00 [Information] Executing ObjectResult, writing value \"Microsoft.AspNet.Mvc.ActionContext\".\r\n    dnx.exe Information: 0 : 2016-01-17 19:00:51.664 +01:00 [Information] Executed action \"avsn.api.Controllers.WalkthroughsController.GetWalkthrough\" in 0.4812ms\r\n    dnx.exe Information: 0 : 2016-01-17 19:00:51.666 +01:00 [Information] Request finished in 0,4828ms 200 application/json; charset=utf-8\r\n\r\nThis is the working case on **kestrel**, replacing {walkthroughId} by just {id}\r\n\r\n    01/17/2016 16:18:52 +01:00 [Information] Protocol: HTTP/1.1  Method: GET  ContentType:   ContentLength:   Scheme: http  Host: localhost:5000  PathBase:   Path: /api/walkthroughs/get/1313  QueryString:\r\n    01/17/2016 16:18:52 +01:00 [Debug] The request path \"/api/walkthroughs/get/1313\" does not match a supported file type\r\n    01/17/2016 16:18:52 +01:00 [Debug] Request successfully matched the route with name 'null' and template '\"api/Walkthroughs/get/{id}\"'.\r\n    01/17/2016 16:18:52 +01:00 [Debug] Executing action \"avsn.api.Controllers.WalkthroughsController.GetWalkthrough\"\r\n    01/17/2016 16:18:52 +01:00 [Information] Executing action method \"avsn.api.Controllers.WalkthroughsController.GetWalkthrough\" with arguments ([\"1313\"]) - ModelState is Valid'\r\n    01/17/2016 16:18:52 +01:00 [Debug] Executed action method \"avsn.api.Controllers.WalkthroughsController.GetWalkthrough\", returned result \"Microsoft.AspNet.Mvc.ObjectResult\".'\r\n    01/17/2016 16:18:52 +01:00 [Debug] No information found on request to perform content negotiation.\r\n    01/17/2016 16:18:52 +01:00 [Debug] Selected output formatter '\"Microsoft.AspNet.Mvc.Formatters.JsonOutputFormatter\"' and content type '\"application/json\"' to write the response.\r\n    01/17/2016 16:18:52 +01:00 [Information] Executing ObjectResult, writing value \"Microsoft.AspNet.Mvc.ActionContext\".\r\n    01/17/2016 16:18:52 +01:00 [Information] Executed action \"avsn.api.Controllers.WalkthroughsController.GetWalkthrough\" in 0.0017ms\r\n    01/17/2016 16:18:52 +01:00 [Information] Request finished in 0,0018ms 200 application/json; charset=utf-8\r\n\r\nThis also happens for routes like this:\r\n\r\n        [HttpGet(\"shop/{shopId}\")]\r\n        public FileStreamResult GetShopLogo(int shopId)\r\n\r\nor\r\n\r\n        [HttpGet(\"rating/{ratingId}\")]\r\n        public FileStreamResult GetRatingLogo(int ratingId)\r\n\r\nor\r\n\r\n        [HttpGet(\"screenshot/{screenshotId}\")]\r\n        public FileStreamResult GetScreenshot(int screenshotId)\r\n\r\nBut this route works by coincidence, and it`s just extended by \"/thumb\"\r\n\r\n        [HttpGet(\"screenshot/{screenshotId}/thumb\")]\r\n        public FileStreamResult GetScreenshotThumb(int screenshotId)\r\n\r\nI also tried using the \"Route\" attribute instead of \"HttpGet\". This does not bring any positive results either.\r\n\r\nAny ideas? Running it on windows, with the WebListener \"web\" command it works fine.\r\n\r\n// Update: Filed this problem in the Routing as well: https://github.com/aspnet/Routing/issues/279"},"comment":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/comments/172747123","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/587#issuecomment-172747123","issue_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/587","id":172747123,"user":{"login":"ankitbko","id":3169316,"avatar_url":"https://avatars.githubusercontent.com/u/3169316?v=3","gravatar_id":"","url":"https://api.github.com/users/ankitbko","html_url":"https://github.com/ankitbko","followers_url":"https://api.github.com/users/ankitbko/followers","following_url":"https://api.github.com/users/ankitbko/following{/other_user}","gists_url":"https://api.github.com/users/ankitbko/gists{/gist_id}","starred_url":"https://api.github.com/users/ankitbko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankitbko/subscriptions","organizations_url":"https://api.github.com/users/ankitbko/orgs","repos_url":"https://api.github.com/users/ankitbko/repos","events_url":"https://api.github.com/users/ankitbko/events{/privacy}","received_events_url":"https://api.github.com/users/ankitbko/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T05:43:45Z","updated_at":"2016-01-19T05:43:45Z","body":"Well.. I am unable to reproduce the issue. Is it possible for you to create a sample repo with code?\r\nWhat version of dnx are you using and what runtime? "}}