Use IOperationBehaviour to prevent operation from running
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
精彩评论