Can I overwrite Silverlight application resources at runtime?

There is a ServiceReferences.ClientConfig file that contains various settings for WCF Silverlight applications. Nice and easy, unless you install them, you cannot change them later without changing xap.

I want these settings to be configured with less pain. There are several options:

  • Add the highlighted section to web.config where the administrator can change them. Transfer these settings to Silverlight, and then to the object. Disassemble it in silverlight, then create the channel manually. Something I'd rather avoid.
  • It would be nice if we could say that the silverlight application loads ServiceReferences.ClientConfig not from xap resources, but from a specific uri. That way, I could put this configuration along web.config. Nice. Impossible though.
  • If I could replace the resource flow definition tool, that would work too. Unfortunately, this is also not possible. There is an IApplicationResourceStreamResolver, but it is internal.
  • Perhaps there is a way to rewrite the application resource stream after starting the silverlight application?
+3
source share
1 answer

I think you want to make the servicesclient configuration file at runtime.

, System.ServiceModel.BasicHttpBinding URL- System.ServiceModel.EndpointAddress. endpointaddress voila!

+2

All Articles