I'm accessing a WebAPI resource like this:
localhost/myapp/api/values?ParamOne=123&ParamTwo=testing
In ValuesController, I have this:
public class MyParams {
public int? ParamOne {get;set;}
public string ParamTwo {get;set;}
}
[HttpGet]
public HttpResponseMessage Get([FromUri]MyParams someparams) {
...
}
When I try to access the resource, I get this error:
HTTP Error 403.14 Forbidden The Web server is configured to not list the contents of this directory
Here's the RouteConfig.cs, which is just the default:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new {controller="Home", action="Index", id=UrlParameter.Optional}
Anyone know what I'm doing wrong?
WebApiConfigfile insideApp_Startfolder.