How to get correct stack trace for exceptions in Web API 2 async actions?

前端 未结 3 1037
陌清茗
陌清茗 2021-02-13 04:53

I have a simple API controller method

public async Task GetByDate(DateTime date, string user = null)
{
    throw new InvalidOperationExce         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-13 05:29

    This has been fixed in WebApi 2.1 (assembly version 5.1.1)

    Follow these instructions to upgrade to the latest version: https://www.nuget.org/packages/Microsoft.AspNet.WebApi

提交回复
热议问题