Plugin Dev with WCF Reference Error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
All,

I have developed a plugin for NOP that references a WCF service. The WCF service DOES NOT reside on the same server as the NOPCommerce instance.

I keep getting the following error aafter I install the Plugin:

"Could not find endpoint element with name 'WSHttpBinding_IService1' and contract 'Tax.IService1' 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."

My app.config file looks like this:


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsHttpBinding>
                <binding name="WSHttpBinding_IService1" />
            </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://##.##.##.##:PORT#/Service1.svc"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1"
                contract="Tax.IService1" name="WSHttpBinding_IService1">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>


I also added this configuration to the web.config file located in the Plugin Root:


<system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IService1" />
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://##.##.##.##:PORT#/Service1.svc"
          binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1"
          contract="Tax.IService1" name="WSHttpBinding_IService1">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>


I have masked the IP Address. So ignore that. :)

Is there something that I am missing? I cannot get this plugin to work with my WCF webservice.

Any help or guidance would be appreciated.

Thanks,

Greggory
10 years ago
Anybody?? Not even Andre? :P
10 years ago
Hello

Did you check your web.config file in root directory?
I think that you should have the service reference also in that file

something like that:

<system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IService1">
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://xxx.xxx.xxx.xxx/Service1.svc"
        binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1"
        contract="PantheonService.IService1" name="WSHttpBinding_IService1">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>


Andrej
7 years ago
Hi,

did you find a solution to your problem?

Thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.