My route is configured correctly, and my methods have a decorated tag. Am I still getting "The requested resource does not support the HTTP" GET "message?
[System.Web.Mvc.AcceptVerbs("GET", "POST")] [System.Web.Mvc.HttpGet] public string Auth(string username, string password) {
Here are my routes:
config.Routes.MapHttpRoute( name: "AuthentificateRoute", routeTemplate: "api/game/authentificate;{username};{password}", defaults: new { controller = "Game", action = "Auth", username = RouteParameter.Optional, password = RouteParameter.Optional }, constraints: new { httpMethod = new HttpMethodConstraint(HttpMethod.Get) } ); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { controller = "Home", id = RouteParameter.Optional } );
c # asp.net-web-api routing
Rushino Oct 07 2018-12-12T00: 00Z
source share