This project has moved and is read-only. For the latest updates, please go here.

Merging ServiceReference.ClientConfig

Apr 13, 2010 at 2:41 PM

Hi guys,

we are having a really nice issue. actually we wouldn't expect.

we have a SL 3 application working with 2 wcf service and a ServiceReference.ClientConfig. but when mef load a second xap that include also another ServiceReference.ClientConfig the module loaded can not fine the endpoint because the two ServiceReference.ClientConfig are not merged. that's really annoy.

as a MEF user would be really nice if Mef could do that.

I think is a normal behavior that a xap can have a wcf server side to talk with.

we found 2 workaround.

1) write the endpoint in the xap module programmaticly, but we need to recompile all the time when we want to change url address

2) include in the host ServiceReference.ClientConfig all end point used from the all xap module that has to be loaded ( really dirty )

we think to use the second option , waiting for some merging system from the community ( hoping that the MEF in SL4 has already this behavior)

do you guys have some otehr ideas , suggestion or alternative.


Giovanni D'Arienzo


Apr 13, 2010 at 7:45 PM

Unfortunately MEF's DeploymentCatalog only supports loading assemblies from secondary XAPs it will not load loose files in that XAP, this is actually a limitation in the core Silverlight runtime so there isn't anything we can do to support it. This is the case in SL4 as well. Have a look at Glenn's post for a list of caveats that exist in DeploymentCatalog.

Apr 13, 2010 at 9:59 PM

Yes, and at Wes's suggestion I've gone and ripped that out into it's own post.


Apr 13, 2010 at 11:23 PM
Edited Apr 13, 2010 at 11:28 PM

Hi guys,

ok everything you said is nice, but we need to understand that the module xap as an extended part or subapplication will be included in the principal application. So i'm expecting that the joining will be in an atomic way. it's like if you want to use an exe file but you can not use the app.config. you can not use it as an a subapplication, at least it's not configurable easly. at that point we must write what the system.configuration does but in xml, avoiding also the capability that the wcf engine has to get automaticly way the endpoint list.

sorry for my bad english, but do i am wrong?

at least they should create what the the clausole partial does or maybe merge the file in memory and let the framework use it in memory. it's not a big deal.

do you guys thing that this is something durable?


Giovanni D'Arienzo