Merging ServiceReference.ClientConfig

Apr 13, 2010 at 1: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.

regards

Giovanni D'Arienzo

 

Developer
Apr 13, 2010 at 6: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 http://blogs.msdn.com/gblock/archive/2010/03/08/building-hello-mef-part-iv-deploymentcatalog.aspx for a list of caveats that exist in DeploymentCatalog.

Apr 13, 2010 at 8:59 PM

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

http://blogs.msdn.com/gblock/archive/2010/04/13/caveats-about-deploymentcatalog.aspx

 

Apr 13, 2010 at 10:23 PM
Edited Apr 13, 2010 at 10: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?

cheers 

Giovanni D'Arienzo