BACKGROUND
We have a WCF web service hosted in a Windows Service running with the basicHttpBinding
Try using useRequestHeadersForMetadataAddress
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<useRequestHeadersForMetadataAddress />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
This will allow the service to insert the URI you used to access the service in to the metadata so the wsdl aligns. Sometimes you'll go to access http://1.2.3.4/service.svc
but the metadata will reference http://localhost
. Locally that's fine, but remotely that makes grabbing the endpoint information impossible. Instead, now all those localhost
references will use 1.2.3.4
instead.