I have a WCF host service I am working on which needs to be created to a specific standard. I am using a custom binding to achieve most of the requirements of the standard.
WS-Addressing headers are required in the response and request headers, and though some seemed to be configured automatically we were missing the "MessageID", "From" and "To" elements.
We added the "From" "To" and "ReplyTo" headers on our test client using message inspectors and the "BeforeSendRequest" method. This worked as expected.
On the host service we tried to use the same approach for "MessageID", "From" and "To" elements using the "BeforeSendReply" method. However only "MessageID" and "From" headers appear in the message. The "To" header does not get added.
Could anyone offer any suggestions of
1. How to include/add the "TO" ws-addressing header to the response message?
2. The reason WCF does not add the "To" header to the message using the message inspector method for responses?