webconfig:<services>
  <service behaviorConfiguration="SL_500Wan.Web.Behavior" name="SL_500Wan.Web.DBService">
  <endpoint address="" binding="wsDualHttpBinding" bindingConfiguration="" contract="SL_500Wan.Web.IService" />
  < rvice>
  < rvices>
报错:
在 ServiceModel 客户端配置部分中,找不到引用协定“Kiss.IService”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。请高人指点到底错在哪里?谢谢

解决方案 »

  1.   

    客户端配置用svcutil.exe生成的吗
      

  2.   

    我也碰到了这个问题:“在 ServiceModel 客户端配置部分中,找不到引用协定“IPartsHistory”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。”我的情况是:通过SvcUtil.exe生成的客户端代码和配置文件,问题就是出现在这个客户端的配置文件上,
    第一:文件名一定要是App.config;第二:endpoint的name属性值,在代码实例化时要一致。
      

  3.   

    我按你说的做了,可怎么不行呢,我的没有App.config文件,只有Web.config文件
      

  4.   

    这个问题就是你要将app.config中代码复制:
     <client>
          <endpoint address="http://localhost/ZHTFDistributedServices/TestModule/TestModuleService.svc"
              binding="basicHttpBinding" bindingConfiguration="basicSilverlight"
              contract="Proxies.TfBomModuleService.ITestModuleService" name="basicSilverlight" />
        </client>
    然后打开你Web程序的web.config文件找到<system.serviceModel>节点中的 <bindings>节点,然后粘贴到 </bindings>只有就行了.
    我也是刚刚找问题的时候看到,呵呵