I have a class library (.NET) with a link to a web service (on some server, not on a project in the same solution). The class library has a class that is exposed to COM. This class calls the web service.
When I add a link to the service, this adds the code to the app.config class library.
I also have a desktop application in the same solution, just for testing purposes. When I run this application, it throws this exception:
Could not find the default endpoint element that refers to the ServiceProxy.EventsServices contracted service in the ServiceModel client configuration section. Perhaps this is due to the fact that the configuration file was not found for your application, or because the leaf element corresponding to this contract was not found in the client element.
This exception can be resolved by copying and pasting the generated code for the service link in the app.config class library into the desktop configuration file.
When deploying, I should only deploy the DLL (built from the class library), not the desktop application. I need to include a service link in a configuration file that can be read in a DLL.
Any suggestions?
Thanks!
bloparod
source share