skip to Main Content

ASP.NET Core not post data to Action Model

When posting data to Action Method from Ajax Post to Action Method, model is always null. Tried with FromBody and without it, both fails. I am using .NET Core 7.0 My Controller Action Method [HttpPost] public async Task<JsonResult> AddOrUpdateAddress([FromBody]AddressViewModel model)…

VIEW QUESTION

Visual Studio Code – Exception is always thrown by httpClient.PostAsync. I can temporarily get past it with ConfigureAwait(false) but I can't avoid an exception completely

I am doing Async and Await with C# ASP.Net MVC, with Target .Net Framework 4.8 using Visual Studio 2022. So no matter what, I always get an exception when I call httpClient.PostAsync(...). I can call httpClient.PostAsync(...).ConfigureAwait(false) which doesn't give me…

VIEW QUESTION
Back To Top
Search