2012-05-17 47 views
0

的errror消息是:找不到終結點元素

無法與名 「NetbiterServiceReference.nbws」和合同 「NetbiterServiceReference.nbws」在ServiceModel客戶 配置部分找到終結點元素。

app.config文件看起來像這樣:

<system.serviceModel> 
    <bindings> 
     <basicHttpBinding> 
      <binding name="nbws.cfcSoapBinding"> 
       <security mode="Transport" /> 
      </binding> 
      <binding name="nbws.cfcSoapBinding1" /> 
     </basicHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="https://../nbws.cfc" 
      binding="basicHttpBinding" bindingConfiguration="nbws.cfcSoapBinding" 
      contract="NetbiterServiceReference.nbws" name="nbws.cfc" /> 
    </client> 
</system.serviceModel> 

在我的代碼我非常喜歡這一點,我給上面的錯誤消息。

nbwsClient proxy = new nbwsClient(); 

然後我做了所有這些組合,但結果相同:

nbwsClient proxy = new nbwsClient("NetbiterServiceReference.nbws", "https://../nbws.cfc"); 
nbwsClient proxy = new nbwsClient("nbws", "https://../nbws.cfc"); 
nbwsClient proxy = new nbwsClient("nbws.cfc", "https://../nbws.cfc"); 

任何想法,將不勝感激!

回答

0

自己解決。 問題在於,運行帶代碼和app.config的項目的測試項目在app.config中沒有正確的信息。

0

錯誤消息是:在ServiceModel客戶端配置部分找不到名爲'NetbiterServiceReference.nbws'和合同'NetbiterServiceReference.nbws'的端點元素。我的app.config文件看起來是這樣的:


如果更改端點部分如下,你就會失去這個錯誤。

<endpoint address="https://../nbws.cfc" 
      binding="basicHttpBinding" bindingConfiguration="nbws.cfcSoapBinding" 
      contract="NetbiterServiceReference.nbws" name="NetbiterServiceReference.nbws" /> 
+0

感謝您的意見,但它仍然無法正常工作。相同的錯誤消息。 做了一個正常的Web服務引用,它工作。 仍希望使服務引用正常工作。 –