Any ideas?
I know this is asked loads because I've checked a load of links/sites such as this SO question: Could not find default endpoint element
The problem is I have done all the copying of the system.serviceModel over to the main App.Config file and even created an APP.CONFIG file (and copied these references over) for all the corresponding projects in the solution... and I am STILL getting the error.
I am using the constructors:
RegistrationService = new BnRegistrationService.RegistrationServiceClient();
and even tried passing the EndPoint name down too, to no avail.
My system.serviceModel section reads like this:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ISecurityService" />
<binding name="BasicHttpBinding_IBidService" />
<binding name="BasicHttpBinding_IConfigurationService" />
<binding name="BasicHttpBinding_IRegistrationService" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:5166/SecurityService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISecurityService"
contract="BnSecurityService.ISecurityService" name="BasicHttpBinding_ISecurityService" />
<endpoint address="http://localhost:5166/BidService.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IBidService" contract="BnBidService.IBidService"
name="BasicHttpBinding_IBidService" />
<endpoint address="http://localhost:5166/ConfigurationService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IConfigurationService"
contract="BnConfigurationService.IConfigurationService" name="BasicHttpBinding_IConfigurationService" />
<endpoint address="http://localhost:5166/RegistrationService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRegistrationService"
contract="BnRegistrationService.IRegistrationService" name="BasicHttpBinding_IRegistrationService" />
</client>
</system.serviceModel>
I am close to tears with this error and I am seeing the error message on so many sites - all saying copy the above into the MAIN app.config file in the windows project but for some (maybe STUPID - on my behalf) reason it's just not working.
I am initialising all these in a BaseForm and all other forms are inheriting this, causing the dreaded Designer Error Screen to show with the error:
"Could not find default endpoint element that references contract 'BnRegistrationService.IRegistrationService' 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."
Any ideas PLEASE?
Thank you so much in advance!!