c# 4.0 - ASP.NET MVC 4 AttributeRouting Multiple POST Actions in same controller -


i not sure doing wrong here. whenever post request controller update action invoked. calling:

http://localhost/members/login/ 

however update keeps getting request. have tried switching order of actions in controller no avail.

[routeprefix("members")] public class memberscontroller : apicontroller {     [post("{member}")]     public void update(member member)     {         //do stuff     }      [post("login/{member}")]     public httpresponsemessage memberlogin(member member)     {        //do stuff     } } 

any appreciated. thanks!

that because api routing same. this article explain how routing , action selection done in web api. if not want split them 2 controllers make update put request. should tell routing engine 2 different actions.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -