c# - Webapi 2 Attribute Routing -


i have following routes set in user controller:

[enablecors("*", "*", "*")] [routeprefix("api/users")] [authorize] public class usercontroller : apicontroller {     [route("")]     public ihttpactionresult get()      {     }      [httpget]     [route("{id:int}")]     public ihttpactionresult get(int id)      }      [httppost]     [route("validateuser")]     public ihttpactionresult validateuser()     {     }      [httppost]     [route("verify/{identityid}/{emailaddress}")]     public void verifyuseremailaddress(string identityid, string emailaddress)     {     } } 

the first 3 routes work fine. fourth fails 404. i'm using fiddler make call:

http://localhost:39897/api/users/verify/asldkfj/jb@test.com (post selected)

does post require data sent in body? can see i'm doing wrong , why verify route not being found?

the .com in email issue.

sure valid email, iis treats requests file extensions actual file requests , tries find on disk. when can't find 404 not found

if add trailing slash / request should work.

ie http://localhost:39897/api/users/verify/asldkfj/jb@test.com/


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -