This project is read-only.

Optional parameters no longer work in RC

Topics: ASP.NET Web API
Jun 6, 2012 at 10:35 PM
Edited Jun 6, 2012 at 10:38 PM


In beta I had a web api action that looked something like this:

public class DesignsController : ApiController
	[Queryable(ResultLimit = 500)]
	public IQueryable GetList(string brandIds = null)

Which would allow me to access the action using either:



However the first route (/api/designs) no longer works after upgrading to the RC. I get the response:

No action was found on the controller 'Designs' that matches the request.

Is this something I'm doing wrong?

Jun 7, 2012 at 12:42 AM

Hi Grokys, you might be hitting this issue: which should be fixed in the latest codeplex bits but probably not in RC.

Can you try the following and see if it works around the issue?

public IQueryable GetList(string brandIds = "")



Jun 7, 2012 at 8:31 AM

Hi Yao, yes that works around the issue, thanks.

Dec 13, 2012 at 4:28 PM

FYI, this doesn't work with the latest nightlies at least with POST/PUT where the POST/PUT has the values in the URL.

Dec 13, 2012 at 4:58 PM

Thank you for reporting this issue.

Could you please create a new issue in our Issue Tracker with detailed steps on how to reproduce the issue (attaching a sample project is best) so that we can investigate?

Daniel Roth