【发布时间】:2021-10-12 13:51:10
【问题描述】:
【问题讨论】:
【问题讨论】:
解决这个问题的方法是SuppressMapClientErrors在Startup.cs中加上ConfigureApiBehaviorOptions,如下图:
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers().ConfigureApiBehaviorOptions(x => { x.SuppressMapClientErrors = true; });
...
}
【讨论】: