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:
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
Post a Comment