tags:

views:

28

answers:

1

I want to access apis which i got from a wsdl file. I add the reference to this API in dll which is created using C#.

The dll which I created is accessed in another C# exe. When i try to access the API it is giving the following exception

System.InvalidOperationException: Could not find default endpoint element that references contract 'ApiService' 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.

Can anybody tell me what the error is

+2  A: 

It seems you are trying to use WCF. WCF's endpoints need configuration placed in serviceModel element of your app.config. You need to add it. here is the sample.

elder_george
+1 exactly - configuration is missing
marc_s