c# - Route attributes not registering my controller method -


i trying register new route handles login functionality same way did other routes. other routes worked login 1 not.

here route attribute working routes:

 // post api/user/adduser  [httppost]  [route("api/user/adduser")]  public ihttpactionresult adduser([frombody]user user)   {      blah blah  } 

here code login method:

 // post api/user/login  [httppost]  [route("api/user/login")]  public ihttpactionresult login(string email, string password)  {      blah blah  } 

and here webapiconfig.cs:

 // web api routes  config.maphttpattributeroutes();   config.routes.maphttproute(      name: "userrouteapi",      routetemplate: "api/user/{method}"  ); 

this http response when try access login api ->

output on browser:

image

i don't it, created route same way did previously. tried restarting visual studio, iis express, pretty sure route template correct.

i need desperate here!


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -