Last post Aug 18, 2009 01:47 AM by tvish
Aug 11, 2009 08:37 AM|jez9999|LINK
I'm asking this question more in hope than in expectation, because I think it could be really rather tricky, but I'm hoping someone might have an idea as to how to do it.
I'm wanting to have some code to intercept a call to all my REST WebGet/WebInvoke methods, so that I can implement authentication there. This code needs to be aware of *which* method is about to be invoked, because different methods are going to have different
authorization requirements. This means I can't just add an interceptor, because it won't know which method is about to be invoked (I think?) Is there some way I can hook in to the code chain that calls back the WebGet/WebInvoke methods, perhaps by extending
the WebServiceHost2 class? I can't figure it out. Thanks!
rest wcf operation intercept call method
Aug 18, 2009 01:47 AM|tvish|LINK
I think you can plug in an IParameterInspector using an IOperationBehavior and throw an exception from there if the caller is not authorized to do the method.