Hi I have a problem with asp.net core.
I have a method in my controller.
[HttpPost]
public async Task<SystemValidationViewModel> DoSomething(string model)
{
try
{
return null;
}
catch (Exception ex)
{
throw;
}
}
This works fine locally, however, when I deploy it to Azure, it doesn’t, in fact I get 404 error. The only difference I can imagine between the two is that Azure uses IIS7.5, and Im works under IISExpress.
It is worth noting that this only happens for Async methods.
Any ideas on what might be causing this problem?
Update:
Thanks, @ andoni-zubizarreta, it seems that the main asp.net methods do not need the async modifier, since by default they are all asynchronous, since we just needed to get the result, not wait ...