ASP.NET Web API: Non-descriptive 500 Internal Server Error

前端 未结 10 1278
难免孤独
难免孤独 2020-12-07 16:08

As title says, I’ve got 500 Internal Server Error from GET request to an IQueryable action. The body of the error is empty. That error happens after my action returns result

10条回答
  •  误落风尘
    2020-12-07 17:08

    I had the same problem, but the source of it was slightly different: I set the CORS policy incorrectly and that gives me 500 Internal server error, but since CORS was not working, the Access-Control-Allow-Origin header was not presented in response and browser can't read the actual response

    I solved it with ChromeDevTools option Copy as cURL which allows me see the response and understand the source of error

提交回复
热议问题