11

Closed

Make IActionMethodSelector public - AjaxOnlyAttribute

description

Currently, Web API contains IActionMethodSelector but unfortunately it's internal. So, you cannot use action method selector or action name selector in Web API. But you can easily create AjaxOnly, Please make this public. See http://forums.asp.net/p/1784268/4910381.aspx
Closed Sep 9, 2013 at 10:24 PM by trdai

comments

trdai wrote Jan 7, 2013 at 8:08 PM

There are a few more scenarios may need this interface to be open:
  1. Distinguish actions with same parameters under same controller when action name is optional in the route. Usually one action is given a name identical to a HTTP verb. So a short URL + same VERB shall be routed to the same, and a URL with something route to the other.
  2. Implement versioning: http://forums.asp.net/t/1772404.aspx/1?Custom+ActionMethodSelector

MikeStall wrote Aug 22, 2013 at 1:04 AM

You can use filters to address some of these scenarios, like AjaxOnly. See http://weblogs.asp.net/imranbaloch/archive/2012/04/01/adding-ajaxonly-filter-in-asp-net-web-api.aspx

MikeStall wrote Aug 22, 2013 at 9:41 PM

We've removed this interface altogether: https://aspnetwebstack.codeplex.com/SourceControl/changeset/054d57adde8882419ef4102892b2e70378350837
If there are new extensibility scenarios we need, we can look at those specifically regardless of this interface.