I want all WCF service calls to return a CallDuration custom HTTP header.
On the server there is a an IDispatchMessageInspector implementation with this BeforeSendReply implementation:
public void BeforeSendReply(ref Message reply, object correlationState) { // ... calculate CallDuration etc. ... // send CallDuration WebOperationContext.Current?.OutgoingResponse?.Headers.Add("CallDuration", $"{duration.TotalSeconds}"); } This ought to add CallDuration as a custom HTTP header to all WCF responses. However that is not the case.
What are the possible filters that could prevent the custom HTTP header from reaching the client? Other HTTP headers remain intact.

.Headerswithout?.calls in previous steps and using only.there? The?.operation stops execution if left hand side is null from some reason and you won't get any error as a result.