I have this (simplified) ASP.NET Core Web API controller. Both the GET and POST actions works nicely on my own machine. However, deployed to Azure only the GET action works properly. The POST action results in a 404. Any ideas?
namespace Foo
{
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
[RequireHttps]
[Produces("application/json")]
[Area("Foo")]
[Route("[area]/Api/[controller]")]
public class BarController : Controller
{
[HttpGet]
public IEnumerable<string> Get()
{
return new[] {"Hello", "World!"};
}
[HttpPost]
public void Post([FromBody] InputModel model)
{
}
public class InputModel
{
public int Foo { get; set; }
}
}
}
It is an ASP.NET Core MVC application targeting the full .NET framework. It is deployed as an Azure Web App. I have tested both actions on my local machine and in Azure using Postman.
InputModelclass?