Reputation:
Mine is windows application. I am using web service. When i add service reference to my application it is generated one app.config file.
<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>
and i am calling this API as
UUCPAPI.UUCPAPIServerClient uucp = new UUCPAPI.UUCPAPIServerClient();
here it is throwing exception as
Could not find default endpoint element that references contract 'UUCPAPI.IUUCPAPIServer' in the
ServiceModel
client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element."
Upvotes: 1
Views: 1240
Reputation:
<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>
Upvotes: -1