Answer the question
In order to leave comments, you need to log in
ASP.NET WebApi POST not coming to IIS server. What could be the problem?
There is a project on ASP.NET WebApi. There is a method that accepts a POST request, and the model I created of type TestModel acts as a parameter. I send it to LAN - everything works - on the server - no. The model object does not arrive. On GET everything works without problems. Immediately a solution pops up in my head - to allow POST on the IIS server. Well then tell me where it is done. CORS are allowed. This is not the first time POST to IIS has failed.
[System.Web.Http.HttpPost]
public async Task<IHttpActionResult> Login(TestModel test)
{
try
{
return Ok(test.email);
}
catch (Exception ex)
{
return Ok(ex);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question