I am trying to call a web service method using c# and I get a response
There was no endpoint listening at https://sub.example.com/Service/Services.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Inner exception as follows
The remote server returned an error: (404) Not Found.
I am thinking that this is because of proxy or some other issue. When I add the reference using Visual Studio it will auto generate soap address to
So the key problem is that service is available by different address externally but IIS responses are using internall address.
I have tried to call web service methods using different approaches binging connection to proxy address but it is no use. Is there a way to solve this or does the service provider need to make a change in the IIS configuration?
Config is as follows
<behaviors>
<serviceBehaviors>
<behavior name="ServiceLibrary.Service1Behavior">
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True" />
<serviceAuthorization principalPermissionMode="None" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBindingConfiguration" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
When accessing site using http the service returns either IP or name, same as in the address bar. But when accessing using https service returns computer name.