I am playing around creating a demo prism application. The application I have has a shell project and another module that has a prism service and a view (and a view-model). (mostly based off of Mike Taulty's videos, but in WPF rather than silverlight).
I setup the prism-service to call my web service. It seemed all setup right, but when I call this code:
MyServiceReferenceClient myServiceReferenceClient = new MyServiceReferenceClient();
I got this error:
Could not find default endpoint element that references contract 'MyServiceReference.IMyService' 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 googled the error and found that I needed to put the contents of my app.config into my shell project for it to work.
I copied that file over to my Shell project and it worked just fine.
But I don't like this. The idea of prism is to be modular. If I have to have references to all the web services called in the modules then the shell has to know more about the inner workings of each module than it should.
Is there a way to call web services in modules and still have the cool Prism benefits of modules (via config file) and regions being the only thing the shell needs to know about?