I have a referenced web service in an InfoPath form that I'm trying to initialise. The service is named Service1 by default within the solution. I'm trying to understand what I'm missing when I run the line:
LabM_Service.Service1SoapClient svc = new LabM_Service.Service1SoapClient();
Error:
Could not find default endpoint element that references contract 'LabM_Service.Service1Soap' in the ServiceModel client configuration section
The app.config contains:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Service1Soap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://ift.tt/1DxBybS"
binding="basicHttpBinding" bindingConfiguration="Service1Soap"
contract="LabM_Service.Service1Soap" name="Service1Soap" />
</client>
</system.serviceModel>
</configuration>
What am I missing here?

0 commentaires:
Enregistrer un commentaire