none
Could not find endpoint element with name 'System.ServiceModel.BasicHttpBinding' and contract 'X' RRS feed

  • Question

  • I have added a remote service reference from WSDL : https://remote.site:443/ws/frameworki/searchPerson.wsdl   & this has added several,classes and partials to my project  including 

     FrameworkiSearchPersonPortTypeClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                    base(binding, remoteAddress) {
            }

    I assume this is the customClient class, as its the only one that takes a binding &  endpoint 

    In My app code, 

    string url = "https://remote.site:443/ws/frameworki/searchPerson";
    EndpointAddress epoint = new EndpointAddress(url);
    BasicHttpBinding binding = new BasicHttpBinding();
     myAPI.FrameworkiSearchPersonPortTypeClient client = new  myAPI.FrameworkiSearchPersonPortTypeClient(binding.ToString(), url);

    triggers the error :

    "Could not find endpoint element with name 'System.ServiceModel.BasicHttpBinding' and contract myAPI.FrameworkiSearchPersonPortType' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.  "

    The web config contains the following system.serviceModel 

     <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding name="FrameworkiSearchPersonSoapBinding">
              <security mode="Transport" />
            </binding>
            <binding name="FrameworkiSearchPersonSoapBinding1" />
          </basicHttpBinding>
        </bindings>
        <client>
          <endpoint address="https://remote.site:443/ws/frameworki/searchPerson"
            binding="basicHttpBinding" bindingConfiguration="FrameworkiSearchPersonSoapBinding"
            contract="myAPI.FrameworkiSearchPersonPortType" name="FrameworkiSearchPerson" />
        </client>
      </system.serviceModel>

    I have tried a few tweaks so far, with no success : 

    Change the bindings to be BasicHttpsBinding  or WSHttpBinding 
    Change the contract to be include the namespace


    Can anyone help? 

    Thanks in advance


    Richard

    Thursday, November 26, 2015 1:18 PM

Answers

All replies