I have a WPF Window which calls a class library connected to a WCF Web Service.
The constructor of this Window calls the class library to get some data.
Everything is working fine when i run the solution, but when I try to open my Window in design mode, I’m getting this error:
Could not find default endpoint element that references contract ‘FinancesService.IAccountingService’ 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 have tried google, but it only says my problem is the config file, but I do have the config in my main project.
Thanks
You can use DesignerProperties.GetIsInDesignMode to detect design mode, and avoid attempting to call your web service.