Click here to Skip to main content
15,895,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm busy with a Silverlight 3 project for the purpose of learning Silverlight. I'm working from this example:
Building Modular Silverlight Applications[^]

I've got it all to work just fine, but I'm finding it a bit difficult to get my WCF service so it would work properly across all modules and Silverlight and WCF are both pretty new to me. So now I'm somewhat stuck. To have access to my service through all my modules I have to add a reference to the service in each module. This seems redundant to me.

So my Question here is: Is there a way to have a single reference to the service and then have all the modules work from that single reference?? Something like a wrapper class maybe or interface?? I just don't know how to implement something like this with silverlight and WCF.


I hope my question makes sens.
Thanks
Posted

I got it to work they way I wanted... sorta. I created another project in my solution and added the Service reference to it. Then I just reference the new project in all the modules. So I have access to everything in the service in all my modules. But the app would still not run. I now still have to have the "ServiceReferences.ClientConfig" file included in each module .xap so the module can actually call the service.

I'll keep looking for other ways though, but for now this will do.
 
Share this answer
 
Make sure all your cross domain / client access policy files are in place.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900