C# 找不到引用协定的默认终结点元素
我的是windows应用程序。我正在使用web服务。当我向我的应用程序添加服务引用时,它会生成一个app.config文件C# 找不到引用协定的默认终结点元素,c#,.net,wcf,wcf-configuration,C#,.net,Wcf,Wcf Configuration,我的是windows应用程序。我正在使用web服务。当我向我的应用程序添加服务引用时,它会生成一个app.config文件 <client> <endpoint address="http://58.71.131.223/uucpapi/UUCPAPIServer.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUUCPAPIServer" contrac
<client>
<endpoint address="http://58.71.131.223/uucpapi/UUCPAPIServer.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUUCPAPIServer"
contract="UUCPAPI.IUUCPAPIServer" name="WSHttpBinding_IUUCPAPIServer">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
这里它抛出异常作为
找不到引用协定的默认终结点元素
ServiceModel
客户端配置部分中的“UUCPAPI.IUUCPAPIServer”。这可能是因为找不到应用程序的配置文件,或者在客户端元素中找不到与此协定匹配的端点元素。“
您可以发布服务器和客户端配置吗?您好,这些是客户端设置“”
UUCPAPI.UUCPAPIServerClient uucp = new UUCPAPI.UUCPAPIServerClient();
<client>
<endpoint address="http://...../uucpapi/UUCPAPIServer.svc"
binding="wsHttpBinding"
binding configuration="WSHttpBinding_IUUCPAPIServer"
contract="UUCPAPI.IUUCPAPIServer"
name="WSHttpBinding_IUUCPAPIServer">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>