WCF IClientMessageInspector.AfterReceiveReply 适用于异步调用
我的 WPF/WCF 4.0 应用程序中有一个消息检查器,它非常适合同步调用,但当我进行异步调用时根本不起作用(即使用 proxy.Begin
符号)。这是预期的还是我做错了什么?
I have a message inspector in my WPF/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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这最终与我如何在服务器端添加标头有关。在调用调用方法之前,我将它们添加到操作调用程序中。我对此进行了更改,因此它调用了调用,然后添加了标头。此后效果很好。不知道为什么会这样,但它解决了我的问题。
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.