Create modal popup dialog to authenticate user and hold singleton object best practices..

Topics: Prism v4 - Silverlight 4
Sep 20, 2011 at 2:14 AM

I'm studying PRISM right now. My application going to be LoB application with modules. I do understand most aspects but I pretty much hit a brick wall with this security problem.

I want users to Authenticate before they log in into my application. I do not allow ANY anonymous activity, this is business application strictly for authorized users. What is the proper approach to do this in PRISM? I found bunch of topics here on how to create login window first and so on but I don't think they cover what's really needed. I don't want any modules to even load before users authenticated. So, I'm all confused. It seems like a common problem but there is no guidance on how to handle this scenario.

I almost feel like authenticate user via ASP.NET form and then just use this authentication in my silverlight application.


Question #2 is how do I store and share some common information. For example, I have "Session" object. How do I carry it across application. Or, how would I access "Module" object from inside my ViewModel?


Sep 20, 2011 at 7:23 PM
Edited Sep 20, 2011 at 8:16 PM


There are several ways to achieve a login scenario. Based on my understanding a good approach could be to load your authentication module, before loading all your business modules. And then you could load the other modules on demand (e.g. using the moduleManager.LoadModule("MyModule") method).

You can find more information regarding that in the Prism documentation:

Also might check the following thread where a similar issue is adressed:

I hope you find this helpful.

Agustin Adami