Hi!
I have a class library (.NET) with a reference to a web service (in some server, not a project in the same solution). The class library has a class that is exposed to COM. This class invokes the web service.
When I add the service reference, this adds code to the class library's app.config.
I also have a desktop application in the same solution, just for test purposes. When I run this application, it throws this exception:
Could not find default endpoint element that references contract 'ServiceProxy.EventsServices' 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.
This exception can be solved by copying and pasting the generated code for the service reference in the class library's app.config into the desktop application' config file.
When I deploy, I have to deploy only the DLL (built from the class library) and not the desktop app. I need to include the service reference in a config file that can be read by the DLL.
Any suggestions?
Thanks!