IIS 7.5: sending http status code 422 with custom errors on

后端 未结 2 1145
北恋
北恋 2021-01-17 15:04

I use custom action filter in asp.net mvc app to return http status code 422 and json list of validation errors (basically serialized model state dictionary) to client, wher

2条回答
  •  臣服心动
    2021-01-17 15:31

    If web server is configured to pass through existing response, it will return json contents to browser.

    
      
      
    
    

    MSDN: httpErrors Element [IIS Settings Schema]

提交回复
热议问题