My windows desktop application can not find the default endpoint element for the reference contract to the web-service APIs on client-side.
The client app can be executed correctly on the Visual Studio IDE, but it runs into some problem in the environment on the client-side.
Both server and client are Windows OS, and both run on the same local network.
I've tried to connect to the web-service with Chrome browser from the client-side to the server-side, so I think that we can assume there are no network problems.
If this is a problem related to the configuration, then how shall I do with the configuration file(s) ?
I'd been searching on Internet for two days. But this problem has remained unsolved.
The snippet from the app.config on the client-side :
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="RemoteAccessWSSoap" maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:49172/RemoteAccessWS.asmx"
binding="basicHttpBinding" bindingConfiguration="RemoteAccessWSSoap"
contract="RemoteAccessWS.RemoteAccessWSSoap" name="RemoteAccessWSSoap" />
</client>
</system.serviceModel>
The snippet from the Web.config on the server-side :
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="WebService1Soap" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647" />
<binding name="Service1Soap" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:49172/RemoteAccessWS.asmx"
binding="basicHttpBinding" bindingConfiguration="RemoteAccessWSSoap"
contract="RemoteAccessWS.RemoteAccessWSSoap" name="RemoteAccessWSSoap" />
</client>
The snippet from the '.asmx.cs' file of the web API on the server-side :
[OperationContract(Name = "HelloWorld")]
string HelloWorld();
[OperationContract(Name = "AddDouble")]
string AddDouble(string a, string b);
Please do me a favor. And thanks very much.
I solved this problem with my experienced colleague's opinion.
He told me that I should rather add the web-service URI as a 'web-reference' than add it as a 'service reference' on Visual Studio IDE.
Thank you very much !