开发者

Use IOperationBehaviour to prevent operation from running

开发者 https://www.devze.com 2023-03-23 16:36 出处:网络
I开发者_Python百科s there anyway to stop an endpoint from being run in WCF? I want to tag an operation with an attribute, probably from IOperationBehavior that does some checks on the AD group of the

I开发者_Python百科s there anyway to stop an endpoint from being run in WCF?

I want to tag an operation with an attribute, probably from IOperationBehavior that does some checks on the AD group of the authenticated user. This will determine if the user can run this function.

What I want is a way (other than throwing an exception, which always returns a 500, or faultcontracts which don't trap errors from the operationbehavior classes) of returning a 401 response when they are not of sufficient privilege, however, I can see any way of doing it.

Can anyone point me in the right direction?

Thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消