I am building a class library (dll) in C# which calls a webservice. This will be consumed by different applications.
However, all these applications have to copy the "bindings" & "client" sections of the libraries app.config to the applications app.config for it to work. Otherwise the application throws an exception at runtime
{"Could not find default endpoint element that references contract 'VS.MyObj' 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."}
FYI - My class library is - MyNS.MyClass. The Library has a Service Reference to a Webservice (added through Add Service Reference) - the Service Reference shows up as MyNS.VS in the Project. The class library is MyNS.dll. MyClass has a static method myStaticFunc which calls the Web Service.
Is there a way to call the Webservice in the class library in some way so that this app.config change in the calling application is not necessary. Or some other workaround.
The owner of one of the calling applications says that he does not have an app.config in his application.