If you're using IIS with Windows Authentification and Entity Framework, be careful to use authorize
.
I tried to POST
without authorize and it didn't work, and get this error on db.SaveChangesAsync();
, while all other verbs GET
and DELETE
were working.
But when I added AuthorizeAttribute as annotation, it worked.
[Authorize]
public async Task Post(...){
....
}