Wcf 服务端点错误

Wcf 服务端点错误,wcf,windows-phone-7,Wcf,Windows Phone 7,我已经编写了一个简单的wp7应用程序。它使用wcf服务和文件来存储用户提供的数据。 我可以成功运行应用程序而不出错,但我遇到运行时错误: “找不到协定'ServiceReference1.IService1'的终结点配置节,因为找到了该协定的多个终结点配置。请按名称指明首选终结点配置节” acf包含以下端点配置集 <services> <service name="WcfDataWallet.Service1"> <endpoint a

我已经编写了一个简单的wp7应用程序。它使用wcf服务和文件来存储用户提供的数据。 我可以成功运行应用程序而不出错,但我遇到运行时错误: “找不到协定'ServiceReference1.IService1'的终结点配置节,因为找到了该协定的多个终结点配置。请按名称指明首选终结点配置节” acf包含以下端点配置集

 <services>
      <service name="WcfDataWallet.Service1">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="NewBinding0"
          contract="WcfDataWallet.IService1">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

谁能帮帮我试试这个吗

MyClientProxy proxy = new MyClientProxy("endpoint name"); eg EndPointNameXXX
其中“端点名称”应指向客户端配置文件中的一个端点

<endpoint address="http://[SERVER]/Service"
                binding="basicHttpBinding" bindingConfiguration="bindingConfig"
                contract="IXXXX.YYYY" name="EndPointNameXXX" />

我也有同样的问题。在VS2010中,我只向我的项目添加了1个服务引用,但是,我注意到在web.config中添加了2个端点

我刚刚注释掉了第二个端点,因为我非常确定我不需要它

就这样

<endpoint address="http://web_services.u.aco/ServicesLocations/1_1/LocationsService.svc"
    binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ILocationsService"
    contract="LocationService.ILocationsService" name="WSHttpBinding_ILocationsService" />
  <endpoint address="http://web_services.u.aco/ServicesLocations/1_1/LocationsService.svc/basic"
    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ILocationsService"
    contract="LocationService.ILocationsService" name="BasicHttpBinding_ILocationsService" />

改为:

<endpoint address="http://web_services.u.aco/ServicesLocations/1_1/LocationsService.svc"
    binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ILocationsService"
    contract="LocationService.ILocationsService" name="WSHttpBinding_ILocationsService" />
  <!--<endpoint address="http://web_services.u.aco/ServicesLocations/1_1/LocationsService.svc/basic"
    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ILocationsService"
    contract="LocationService.ILocationsService" name="BasicHttpBinding_ILocationsService" />-->

现在工作