EDIT: The 'duplicates' are not working - not sure why exactly.
I need to be able to support an ASP.NET WebApi (v5.2.3.0) route that looks like this:
https://example.com/orders/orders.asp
It's for a 3rd party device to be able to interact with my system. I've tried messing around with the RouteConfig like this:
routes.MapHttpRoute(
name: "Orders",
routeTemplate: "api/orders.asp",
defaults: new { controller = "OrderConfirm", action = "Get", id = RouteParameter.Optional }
);
But I always get a 404 error. I've messed around with the "Route" decoration, like this:
[Route("api/orders.asp")]
Controller code:
public class OrdersConfirmController : ApiController
{
[HttpGet]
public HttpResponseMessage Get()
{
string orderContent = "blah, blah, blah";
var response = Request.CreateResponse(HttpStatusCode.OK, string.Empty);
response.Content = new StringContent(orderContent, Encoding.UTF8, "text/plain");
return response;
}
}
But still the 404 errors.
Ideas?