none
Could not find default endpoint element that references contract ...

    Question

  • I have a User Control that calls  methods of a class called ServiceFacade, wich references the service contract. The User Control itself also references the service contract.

    When I try to add the control in a WinForm, in the designer i get the error "Could not find default endpoint element that references contract '...IRutePlanning' 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. ". But when I run the application the control is shown perfectly.

    The strange thing is that I if remove the reference to the service in the class ServiceFacade no errors are shown in the designer.

    What I am doing wrong?

    I would appreciate any help.

    Thank,

    Soledad
    Friday, June 08, 2007 5:48 PM

Answers

  • Sorry, I'm new with Win Forms. For those like me,  in the method  Load of the UserControl you have to put: if (this.DesignMode) return;

    I hope someone find this helpful.

    Soledad
    Friday, June 08, 2007 8:58 PM