You might think that ApiController in ASP.NET MVC will support multiple GET methods out of box, surprisingly it does not.
For more details, refer to my Open source security project on CodePlex at http://applicationsecurity.codeplex.com/
Let us take simple example, you are planning to abstract all user management related logic in a REST service. Your controller might look like this:
And you want to call your VerifyUser passing all the parameters. Let us see what happens…
You are planning to add more methods like LogOff, ResetPassword etc. What do you do?
Solution is simple: You need to add an additional routing BEFORE your default routing as follows:
Let us what happens now:
In order to solve this problem, you need to make the following change in your controller:
Now the final response