Hi,
I have a class library that references a WebService. The configuration settings for this WebService are on the DLL app.config.
Then I have an EXE that uses this DLL to use the WS. When I invoke a method on the WS I get the following message:
"Could not find default endpoint element that references contract 'XXXXXXXXX' 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 suppose I get this error because the app.config of the exe does not have the WS configuration.
I've already concluded that if I move the contents of the DLL app.config to the exe app.config it works, but I don't want to do this.
I want to use the contents of the DLL app.config to configure the WS on the fly (similar to what is possible to do with .NET Remoting with RemotingConfiguration class).
Is this possible?
Thanks in advance