Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Dynamic WCF channel using Prism and Unity

$
0
0
Hello

Using Prism, Unity and WCF, I have the following simple login scenario.
I define a LoginModule containing three elements : a LoginView, a LoginViewModel, and a LoginService.
What is different from all the other examples I have found is that :
  • server url is not known on startup (no app.config wcf definition)
  • server url may change (user disconnects, changes server address, and reconnects)
I face two major problems in LoginModule :
  • I can't register LoginView, because it depends on LoginViewModel, which needs LoginService . But LoginService can't be registered at that time, because server address is unknown.
  • When LoginService is initialized with an address, how to change the underlying channel, LoginService beeing registered using WCF ChannelFactory and Unity ?
I have tried many things using LifetimeManager and proxy, but no success at the moment.

Any help would be appreciated.

Viewing all articles
Browse latest Browse all 1878

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>