Reverse Proxy of WCF services?

Jul 19, 2010 at 9:13 PM
Has anyone got reverse proxy of WCF services to work?  For me, calls are making it to the proxied service but are failing with the following exception:

System.ServiceModel.EndpointNotFoundException: The message with To 'http://localhost/TestService/bin' cannot be processed at the receiver,
due to an AddressFilter mismatch at the EndpointDispatcher.  Check that the sender and receiver's EndpointAddresses agree.

I've gone over the existing forum posts on getting the reverse proxy of WCF services working and I've managed to get the calls through to the server, but there's still something not quite right.

The ManagedFusion.Rewriter.txt contains the following proxy pattern:

RewriteRule ^/(.*)$          http://<machinename>:8081/$1 [P]

Here is the SOAP request as captured by Fiddler.  The "a:To" SOAP header needs to be rewritten to match the proxied address.  How can I do this?

<s:Envelope xmlns:s="" xmlns:a="">
<a:Action s:mustUnderstand="1"></a:Action>
<a:To s:mustUnderstand="1">http://ipv4.fiddler/TestWCFService</a:To>
<Query xmlns="">
<request xmlns:b="" xmlns:i="">