1
votes

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."

1
Can you post the server and client configurations? - Kane
Hi these are the client settings "<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>" - anusha

1 Answers

-1
votes
<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>