开发者

WCF IClientMessageInspector.AfterReceiveReply does work on Asynchronous calls

开发者 https://www.devze.com 2023-03-04 17:58 出处:网络
I have a message inspector in my 开发者_如何学GoWPF/WCF 4.0 application that is working great for synchronous calls, but doesn\'t work at all when I make the calls asynchronous (i.e. use the proxy.Beg

I have a message inspector in my 开发者_如何学GoWPF/WCF 4.0 application that is working great for synchronous calls, but doesn't work at all when I make the calls asynchronous (i.e. use the proxy.Begin<MethodName> notation). Is this expected or am I doing something wrong?


This ended up being related to how I was adding headers on the server side. I was adding them in an operation invoker before I was calling the invoke method. I changed this so it called the invoke and then added the headers. After this it worked great. Not sure why this is, but it solved my problem.

0

精彩评论

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