WCF 4.0 has solved this issue in some instances with a new config option that use Request Headers:this
<behaviors>spa
<behaviors>
<serviceBehaviors>code
<serviceBehaviors>
<behaviorname="XXXXXXX">it
<behaviorname="XXXXXXX">
<useRequestHeadersForMetadataAddress/></serviceBehaviors></behaviors>