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.