c# - Class library error, calling Webservice -
i have class library, calls webservice. when try , instantiate new instance of client, being thrown following error vs:
an exception of type 'system.invalidoperationexception' occurred in system.servicemodel.dll not handled in user code
additional information: not find default endpoint element references contract 'sanctionscheckingservice.isanctionscheckingservice' in servicemodel client configuration section. might because no configuration file found application, or because no endpoint element matching contract found in client element.
my app.config file contains following, looks correct:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.servicemodel> <bindings> <basichttpbinding> <binding name="basichttpbinding_isanctionscheckingservice" /> </basichttpbinding> </bindings> <client> <endpoint address="http://localhost:56200/sanctionscheckingservice" binding="basichttpbinding" bindingconfiguration="basichttpbinding_isanctionscheckingservice" contract="sanctionscheckingservice.isanctionscheckingservice" name="basichttpbinding_isanctionscheckingservice" /> </client> </system.servicemodel>
can point why happening?
Comments
Post a Comment