我遇到問題。 我試圖從應用程序ASP.net MVC訪問wcf Web服務,當我調用方法時出現此異常。訪問wcf服務
There was no endpoint listening at the URI that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
這是我的代碼的web.config
var client = new DSServiceClient();
client.Methode();
服務模型部分
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IDSService" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="localhost:1695/Service1.svc"; binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDSService" contract="ServiceReference1.IDSService" name="BasicHttpBinding_IDSService" />
</client>
</system.serviceModel>
你的代碼很好_if_有一個端點監聽你在app.config中指定的地址,而_if_端點接口公開一個名爲'Methode'的方法。 –
FYI,它的 「WCF服務」,而不是 「一個WCF」 –