找不到默认的终结点元素 [英] Could not find default endpoint element

查看:722
本文介绍了找不到默认的终结点元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了一个代理一个web服务到VS2008 / .NET 3.5的解决方案。在构建客户端.NET引发此错误:

I've added a proxy to a webservice to a VS2008/.NET 3.5 solution. When constructing the client .NET throws this error:

找不到默认端点   元素引用合同   在服务IMySOAPWebService   模型客户configuaration部分。   这可能是因为没有   configuaration文件被发现的你   应用程序或因为没有终点   元件匹配这份合同可以   在客户端元素中找到

Could not find default endpoint element that references contract 'IMySOAPWebService' in the service model client configuaration section. This might be because no configuaration file was found for your application or because no end point element matching this contract could be found in the client element

在搜索这个错误告诉我使用完整的命名空间中的合同。这是我的 App.config中有完整的命名空间:

Searching for this error tells me to use the full namespace in the contract. Here's my app.config with full namespace:

<client>
  <endpoint address="http://192.168.100.87:7001/soap/IMySOAPWebService"
            binding="basicHttpBinding" bindingConfiguration="IMySOAPWebServicebinding"
            contract="Fusion.DataExchange.Workflows.IMySOAPWebService" name="IMySOAPWebServicePort" />
</client>

我运行XP的地方(我提到这一点,因为一些谷歌的点击率提WIN2K3) 在app.config复制到app.exe.config,这样也是没有问题的。

I'm running XP local (I mention this because a number of Google hits mention win2k3) The app.config is copied to app.exe.config, so that is also not the problem.

任何线索?

推荐答案

有测试了几个选项,我终于通过使用解决了这个

Having tested several options, I finally solved this by using

合同=IMySOAPWebService

contract="IMySOAPWebService"

即。没有在配置完整的命名空间。出于某种原因,全名不正确解析

i.e. without the full namespace in the config. For some reason the full name didn't resolve properly

这篇关于找不到默认的终结点元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆