The requested resource does not support HTTP method 'GET'

the requested resource does not support http method 'options
the requested resource does not support http method 'get but using post
the requested resource does not support http method 'put
dynamics 365 the requested resource does not support http method delete
the requested resource does not support http method 'get' uipath
405 http method not supported asp net core
http405 bad method - the http verb used is not supported
the endpoint does not support the provided http method

My route is correctly configured, and my methods have the decorated tag. I still get "The requested resource does not support HTTP method 'GET'" message?

[System.Web.Mvc.AcceptVerbs("GET", "POST")]
[System.Web.Mvc.HttpGet]
public string Auth(string username, string password)
{
  // Décoder les paramètres reçue.
  string decodedUsername = username.DecodeFromBase64();
  string decodedPassword = password.DecodeFromBase64();

  return "value";
}

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 }
);

Please use the attributes from the System.Web.Http namespace on your WebAPI actions:

    [System.Web.Http.AcceptVerbs("GET", "POST")]
    [System.Web.Http.HttpGet]
    public string Auth(string username, string password)
    {...}

The reason why it doesn't work is because you were using the attributes that are from the MVC namespace System.Web.Mvc. The classes in the System.Web.Http namespace are for WebAPI.

ASP.NET Web Api: The requested resource does not support http , If you have not configured any HttpMethod on your action in controller, it is assumed to be only HttpPost in RC. In Beta, it is assumed to support  I have a Web API project and I am unable to enable "PUT/Patch" requests against it. The response I get from fiddler is: HTTP/1.1 405 Method Not Allowed Cache-Control: no-cache Pragma: no-cache Al


just use this attribute

[System.Web.Http.HttpGet]

not need this line of code:

[System.Web.Http.AcceptVerbs("GET", "POST")]

ASP.NET Web API Error {"Message":"The requested resource does , Getting error as Message-The-requested-resource-does-not-support-http-method​-GET when running ASP.NET Web API from browser or  I created my controller, registered my routes and decorated my methods with “[HttpPost]”, but the application would still not allow me to do POST requests to my method (HTTP 405 – Method not allowed. The requested resource does not support http method ‘POST’.). Here’s the Web API Class I was using: using System;


In my case, the route signature was different from the method parameter. I had id, but I was accepting documentId as parameter, that caused the problem.

[Route("Documents/{id}")]   <--- caused the webapi error
[Route("Documents/{documentId}")] <-- solved
public Document Get(string documentId)
{
  ..
}

The requested resource does not support http method 'GET', Good Day All i have a web api with a controller like this public class RegistrationController : ApiController { [System.Web. The requested resource does not support http method 'GET'. Why doesn't this work anymore? (I suppose I could get rid of {action} and just make a ton of controllers, but that feels messy.)


I was experiencing the same issue.. I already had 4 controllers going and working just fine but when I added this one it returned "The requested resource does not support HTTP method 'GET'". I tried everything here and in a couple other relevant articles but was indifferent to the solution since, as Dan B. mentioned in response to the answer, I already had others working fine.

I walked away for a while, came back, and immediately realized that when I added the Controller it was nested under the "Controller" class and not "ApiController" class that my other Controllers were under. I'm assuming I chose the wrong scaffolding option to build the .cs file in Visual Studio. So I included the System.Web.Http namespace, changed the parent class, and everything works without the additional attributes or routing.

the requested resource does not support http method get, But I still get "The requested resource does not support HTTP method 'GET'" message, if i request the url in the browser? Can someone please  ASP.NET Forums / General ASP.NET / Web API / The requested resource does not support http method 'GET'. The requested resource does not support http method 'GET'. RSS


WebAPI - 405 - The resource does not support http 'POST', But when i try to do a POST/ PUT/ DELETE request i'm getting response as '"The requested resource does not support http method 'POST'/  The requested resource does not support http method 'OPTIONS' [Answered] RSS 2 replies Last post Feb 19, 2018 02:17 AM by rcoleils


The requested resource does not support http method 'GET', Good Day All i have a web api with a controller like this public class RegistrationController : ApiController { [System.Web. req.setMethod('POST'); req.setHeader('X-HTTP-Method-Override','PATCH'); or adding "?_HttpMethod=PATCH" to the end of the endpoint I continue to get the error: {"Message":"The requested resource does not support http method 'POST'."} Before I move toward Heroku or MuleSoft, is there any other work arounds that I might not have stumbled across yet?


The requested resource does not support http method 'GET', The requested resource does not support http method 'GET'. Thanks. Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. What Are HTTP Methods? Whenever a client submits a request to a server, part of that request is an HTTP method, which is what the client would like the server to do with the specified resource. HTTP methods represent those requested actions. For example, some commonly-used HTTP methods will retrieve data from a server, submit data to a server