This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I've recently started to work with WebApi, so I decided to use LightSpeed and see if it plays along nicely. Based on the Mvc version of the LightSpeedController I've created an Api controller :
It works pretty nicely, however I've noticed a weird issue. I've recently added an API help page, and my POST methods are not listed in that help page - can't call them externally either - unless I derive from a regular ApiController. Any ideas? |
|
|
I wonder if for some reason this is causing the method to fail the check for being a valid ActionMethod and that is what is causing it to be ignored. Have a look at http://aspnetwebstack.codeplex.com/SourceControl/changeset/view/bfa28d1ddbca#src%2fSystem.Web.Http%2fControllers%2fApiControllerActionSelector.cs and look for the IsValidActionMethod method definition. If you grab that code and compile up your own copy to debug against I would see if its passing that check. If it isn't being picked up correctly then you may need to look at implementing your own ActionSelector - have a look at this for an example - http://www.novanet.no/blog/aanund-austrheim/dates/2012/7/several-post-methods-on-an-apicontroller-using-an-actionselector/ but it would be interesting to know why :)
|
|