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

前端 未结 10 1237
难免孤独
难免孤独 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:10

    I ran into this same issue. I found Kiran Challa's response helpful in getting the actual exception being thrown outside of my action.

    To solve my issue, setting the ProxyCreationEnabled property of my context to false got me a step further.

    In my scenario, my next exception was due to a circular reference in my models. After cleaning that up, the phantom 500 response was gone. Good luck if you haven't solved this yet!

提交回复
热议问题