Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.
This repository was archived by the owner on Nov 27, 2018. It is now read-only.

HttpPost route receive 404 Not Found on Azure #257

Closed
@felipesantanadev

Description

@felipesantanadev

I have a WebApp on Azure, but any HttpPost route receive 404 Not Found.

All the HttpGet routes work fine, but all the HttpPost routes don't work.

This happens only on Azure, that is, in the localhost the HttpPost route works normally.

Here is an example:

[Route("contact")]
public class ContactController : Controller
{
    private IContactMessageRepository _contact;
    private ILogService _log;
    public ContactController(IContactMessageRepository contact, ILogService log)
    {
        _contact = contact;
        _log = log;
    }


    [HttpPost("send")]
    [ValidateAntiForgeryToken]
    public async Task<ActionResult> SendMessage(ContactMessageViewModel model)
    {

    }
 }

...azurewebsites.net/contact/send -> NOT FOUND
localhost/contact/send -> WORKS FINE

I'm trying to POST throught ajax.

I have already enable CORS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions