日期:2014-05-17  浏览次数:20608 次

在 ServiceModel 客户端配置部分中,找不到引用协定的默认终结点元素。
在 ServiceModel 客户端配置部分中,找不到引用协定“PutMCCases.PutMCCasesSoap”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。
怎么解决?

------解决方案--------------------
<configuration>下面添加以下节点
XML code

<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="WSWorkManagerSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://172.16.100.168:8099/WSWorkManager.asmx" binding="basicHttpBinding" bindingConfiguration="WSWorkManagerSoap" contract="ws.WSWorkManagerSoap" name="WSWorkManagerSoap" />
    </client>
  </system.serviceModel>