Invalid operation. Could not find default endpoint element

26 Views Asked by At

I have been given the following end point:

https://itd.dx-track.com/DespatchManager.API.Service.DM6Lite_Test/DM6LiteService.svc

I have added in Visual studio as a Service reference.

And my code to access is:

dxcourier.DMcourier.DM6LiteServiceClient a = new dxcourier.DMcourier.DM6LiteServiceClient();

I get error :

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

I am not sure if I need to pass the configuation name. And if I do what it is?

enter image description here

0

There are 0 best solutions below