This is because of your routing settings and its default values. You have two choices.
1) By changing the route settings to match the Product() parameter to match the URI.
config.Routes.MapHttpRoute(
name: "ActionApi",
routeTemplate: "api/{controller}/{action}/{name}", // removed id and used name
defaults: new { name = RouteParameter.Optional }
);
2) The other and recommended way is to use the correct method signature attribute.
public object Product([FromUri(Name = "id")]string name){
// return the Product with the given name
}
This is because the method is expecting a parameter id when requesting api/Products/Product/test rather than looking for a name parameter.