查询拦截器:更改响应状态代码 [英] Query interceptors: Change response status code

查看:186
本文介绍了查询拦截器:更改响应状态代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当查询拦截器之一返回false时,是否可以更改WCF数据服务返回的HTTP状态代码?

Is it possible to change the HTTP status code returned by WCF Data Services when one of the query interceptors return false?

作为奖励,是否有一种方法可以根据失败的查询拦截器有选择地返回不同的状态代码?

As a bonus, is there a way to selectively return different status codes depending on the query interceptor that failed?

推荐答案

结果我真的在寻找作为参考,可以找到相同的问题此处.

For reference, an identical question can be found here. The same concerns and solution are also expressed here and there, respectively.

这篇关于查询拦截器:更改响应状态代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆