.net - Hook into WCF service before deserialization of client request and after serialization of response -
is there way hook every call client made wcf service
- as client request noticed @ server side (i.e. before deserialization of request)
- after serialization of response has finished
so e.g. points can added latency measurements. it's ok if specific net.tcp, using.
i guess adding idispatchmessageinspector allow me hook in before deserialization of request (albeit after creation of message object, , i'd hook in before that), not after serialization of response.
to hook in before deserializion of requests, wrapping messageencoder (for had wrap messageencoderfactory, , messageencodingbindingelement)
and can hook messageencoder.readmessage() overloads.
hook in after serialization of response, wrapping
ioutputchannel (for had wrap ichannellistener , tcptransportbindingelement), and can hook ioutputchannel.send()/ioutputchannelendsend() overloads.
that's close wire got, , close enough me.
Comments
Post a Comment