ASP.NET+Azure 400 Bad Request doesn't return JSON data

后端 未结 1 1534
广开言路
广开言路 2021-01-30 22:45

There is an action in my ASP.NET MVC controller that returns JSON data with a 400 Bad Request when invalid parameters are passed to the action.

[HttpDelete]
publ         


        
相关标签:
1条回答
  • 2021-01-30 22:53

    Add the following entry to your 'web.config'.

    <system.webServer>
      <httpErrors existingResponse="PassThrough"/>
    </system.webServer>
    

    This will allow HTTP errors to pass through un-molested.

    0 讨论(0)
提交回复
热议问题