0

I have an Api controller: UserController

Inside of this controller I have this method :

[System.Web.Http.HttpPost]
[ActionName("SignUp")]
public async Task<HttpResponseMessage> Post([FromBody]FormDataCollection formData)
    {
        HttpResponseMessage MyHttpResponseMessage = new HttpResponseMessage(HttpStatusCode.InternalServerError); ....
      .....
    }

I want to debug it in Postman but I always get this error:

 "Message": "The requested resource does not support http method 'POST'."

enter image description here

I've tried to add just to set the url in different ways in Postman, but still this problem:

http://localhost:59694/api/user - with Post, I've deleted the `ActionName attribute` from controller.

I've checked the RouteConfig.cs, I have this:

  routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

Can you please advise?

Kar
  • 311
  • 3
  • 7
  • 16
  • Try `public async Task Post([FromBody] string action, [FormBody] string invite_id)` – Hary Oct 05 '18 at 08:36
  • Possible duplicate of [Web api not supporting POST method](https://stackoverflow.com/questions/21494784/web-api-not-supporting-post-method) – Roman Marusyk Oct 05 '18 at 09:17

0 Answers0