I have a WCF service that works fine on the LAN but when trying to access it from outside the service reference fails.
My WCF service is hosted on a win2k3 box that is using a static IP no domain.
I have a WCF service that works fine on the LAN but when trying to access it from outside the service reference fails.
My WCF service is hosted on a win2k3 box that is using a static IP no domain.
I was looking into an approach to reuse the Host header from HTTP request. In my opinion this should work in development as in production.
It turns out is as easy as:
<behaviors>
<serviceBehaviors>
<behavior name="...">
...
<useRequestHeadersForMetadataAddress />
</behavior>
</serviceBehaviors>
</behaviors>
This way if the WSDL endpoint is accessible by a client this ensures that all the associated wsdl/xsd resources will be accessible with the same base url.