在 ServiceModel 客戶端配置部分中,找不到引用協定“XXX”的默認終結點元素


一、問題

在調用遠程web services接口時出現了以下問題:

 

二、可能的原因和解決方法

網站根目錄里的web.config文件缺少了相應的配置信息

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="OSSysServiceSoap" />
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://127.0.0.1/vsappgdhr/gdhr/webservices/OSSysService.asmx"
          binding="basicHttpBinding" bindingConfiguration="OSSysServiceSoap"
          contract="OSSysService.OSSysServiceSoap" name="OSSysServiceSoap" />
    </client>
  </system.serviceModel>
</configuration>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM