Click here to Skip to main content
15,311,717 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am getting following exception while calling wcf service client after consuming the wcf service into my application.

Could not find default endpoint element that references contract 'DashBoardServiceUI.IDashboardDetailService' in the ServiceModel client configuration section.

Thanks
Kishore
Posted

1 solution

Here, similar issue detailed: Could not find default endpoint element that references contract[^]

In order to solve this , you will need copy the System.ServiceModel section of the generated app.config file to the executing assembly project’s .config file (web.config for web application project, app.config for windows or console project) . Then it run like a charm. This is because the app.config file in the class library project is not used by the WCF ,instead the executing assembly project’s .config file will be used.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900