asp.net mvc - Can't get Microsoft.AspNet.WebApi.HelpPage to work -
asp.net mvc - Can't get Microsoft.AspNet.WebApi.HelpPage to work -
i have existing webapi 2 project started empty project. there several controllers, using attribute routing. followed directions install bundle , un-commented required line in helppageconfig.cs file. added documentation 1 of controller's actions , tried access it.
config.setdocumentationprovider(new xmldocumentationprovider(httpcontext.current.server.mappath("~/app_data/xmldocument.xml")));
and verified xml file is, indeed, in app_data folder.
here piece of controller:
[routeprefix("ssa")] public class ssacontroller : apicontroller { /// <summary> /// session statistics list of titles between 2 dates /// </summary> /// <param name="titlelist"></param> /// <param name="startdate"></param> /// <param name="enddate"></param> /// <returns></returns> [route("title/{titlelist?}/{startdate:datetime?}/{enddate:datetime?}")] public ihttpactionresult getssaglobaltitles(string titlelist = null, datetime?, startdate = null, datetime? enddate = null)
when request http://myurl/help
404. http://myurl/api/help
returns "no http resource found" message. seem not understanding basic. missing?
asp.net-mvc web-api
Comments
Post a Comment