【发布时间】:2013-04-09 18:18:04
【问题描述】:
我有问题。 我尝试从应用程序 ASP.net MVC 访问 wcf Web 服务,但在调用该方法时出现此异常。
在 URI 上没有可以接受的端点监听 信息。这通常是由不正确的地址或 SOAP 操作引起的。 有关详细信息,请参阅 InnerException(如果存在)。
这是我的代码
var client = new DSServiceClient();
client.Methode();
web.config 的服务模型部分
<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>
【问题讨论】:
-
您的代码很好命名为
Methode。 -
仅供参考,它是“WCF 服务”,而不是“WCF”
标签: wcf