asp.net mvc 4 - WebApi Routing not working -


i have 1 issue webapi routing. please find code snippet below-

 config.routes.maphttproute(                name: "reportsapi",                routetemplate: "api/{controller}/list/",                defaults: new { reports = routeparameter.optional  }            ); 

earlier working fine , there no change in code of report module , stopped working after deployment of version. url that-

https://whatever.com/api/reports/list

when remove '/list' above url works expected.

issue fixed adding

 [httpget]   [actionname("list")]  

in controller before method.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -