I've developed a WCF SOAP Web Service and for testing purposes i use SOAP UI but i have the following problem:
1) I test the Web service using the ip adress like this:
http://XXX.XXX.XXX.XXX:81/SIDIGE.Web.Service.CanDoc.svc?wsdl
and everything works FINE, I can use the web service without issues
2) Now if I test the Web service like this (using the hostname):
http://hp_webserver:81/SIDIGE.Web.Service.CanDoc.svc?wsdl
I get a 404 error when i POST info to the server (if I use the browser and type the address it works, no 404 error)
I've read all questions about this and nothing seems to work....any ideas?
My web.config is:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="servidorRemoto" connectionString="Data Source=XXX\XXX; Initial Catalog=XXX" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<services>
<service name="SIDIGE.Web.Service.CanDoc" behaviorConfiguration="ServiceBehavior">
<endpoint address="CanDoc" binding="basicHttpBinding" contract="SIDIGE.Web.IService.ICanDoc" bindingNamespace="http://sidige.com/candoc" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://XXX.XXX.XXX.XXX:81" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
<serviceDebug includeExceptionDetailInFaults="True" />
<useRequestHeadersForMetadataAddress>
<defaultPorts>
<!-- Use your own port numbers -->
<add scheme="http" port="81" />
</defaultPorts>
</useRequestHeadersForMetadataAddress>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>
</configuration>
The problem wasn't on my part or the configuration. It was the testing client (SOAP UI). It seems it has some issues with proxy networks.