Friday, April 25, 2014

WSDL SOAP address location is using the computer name instead of the IP address in WCF

1 You can use below setting to change WSDL SOAP location address.

<behaviors>
        <serviceBehaviors>
            <behavior name="ServiceBehavior">
                <useRequestHeadersForMetadataAddress>
                    <defaultPorts>
                        <add scheme="http" port="8080" />
                    </defaultPorts>
                </useRequestHeadersForMetadataAddress>
2. you can also set your correct wsdl soap location address in httpGetUrl attribute under ServiceMetaData as below
<behaviors> 
<serviceBehaviors> 
<behavior name="ServiceBehavior"> 
<serviceMetadata httpGetEnabled="true" httpGetUrl="htttp://youipaddress/test/service.svc"/> <serviceDebug includeExceptionDetailInFaults="true" /> 
</behavior> 
</serviceBehaviors>