Hello,
I'm migrating from ASP.NET Core 2.2 to ASP.NET Core 6 on Azure. I have several modified Raspberry Pi(StratoPI) that make request every 10 seconds to .NET Core portal after some operations response back.
On localhost, everything works perfectly fine, test it with Postman, but when I publish the project to Azure, the requests stop working, but with Postman request they still working when is already published.
I use Nlog, and there are no errors.
Is there can be some firewall that added to .NET Core 6, because on .NET Core 2.2 everything is working.
My API code:
[Route("api/[controller]")]
[...ApiController]
public class ...ApiController : ControllerBase
{
private readonly ILogger<...ApiController> _logger;
public ...ApiController(ILogger<...ApiController> logger)
{
_logger = logger;
}
[HttpPost]
public string GetWithBody([FromBody] S...Get s...Get)
{
}
}
I've searched a lot of, but cannot find anything that can bring me to the solution of this.
Also catch some errors from Azure Log stream: HTTP Error 400.0 - Bad Request ... The request could not be understood by the server due to malformed syntax. which can be anything.
I think there is something that I have to add to Program.cs to unblock this request, but cannot find what can be.
I am grateful for any straw that will help me find the problem.