I Have a Web API endpoint like something below -
[HttpPost]
[ActionName("ResetPassword")]
public HttpResponseMessage ResetPassword(string userName, string Template, string SubjectKey,[FromBody] Dictionary<string, string> KeyWords)
As you see, there are 4 parameters to the WebAPI. However, other than the first parameter 'userName', all other parameters are optional. All the parameters are of string type and as such by default nullable.
I have configured the route, using convention based routing (it's a legacy project).
Config.Routes.MapHttpRoute(
name: "ResetPasswordResetV2",
routeTemplate: "Email/ResetPassword",
defaults: new { controller = "Email", action = "ResetPassword", routeValue = true });
I was expecting it to work with either -
http://{base address}/V2/Core/Email/[email protected]&template=&subjectKey=
http://{base address}/V2/Core/Email/[email protected]
Not working. I get a 404. Any tips what I am doing wrong. I have read all kind of SO and doc links and there looks to be too much information to process.
Additionally, what does this 'routeValue = true' means ?
Update : I got it working with the first URL but I would have expected it to work with the second API too. One more Info, my controller has one more Action with similar sets of input parameters but the action name is different (Can that in any way mess it up ?)

