How to replace the default RIA WCF Service with another WCF Service

Topics: Prism v2 - Silverlight 3
Jan 30, 2010 at 10:21 PM


I'm new to Prism and composite Silverlight application development. But I want to upgrade or current web application frow Web Forms to Silverlight. In todays version of the web application we have one WCF Service which serves the Web Form client with everything that it needs. So my first step is to replace the default authentication with the one we have today using our WCF Service.

I have created a new "Silverlight Business Application" in Visual Studio 2010 with Silverlight 4 beta. Where do I reference my WCF Service, in the Silverlight-project or in the Web-application project?

How do I make the authentication to use my WCF service to authenticate the user instead of the in-built AuthenticationService? I cant find where this Service is either, the web.config is rather clean and contains not much that helps me.....

Could someone please help me with some basics here?



Feb 2, 2010 at 1:08 PM
Edited Feb 2, 2010 at 1:09 PM


Prism does not provide any out of the box authentication service, so you would need to implement your own service and register it in the container to use it. The WCF service should be referenced in the project that is going to make use of it, so it should be in any of your module projects or the Shell (all Silverlight projects). You should take this into account when configuring your service.

A common approach would be registering the authentication service in your application’s Bootstrapper (ConfigureContainer method) and authenticating the user before the modules are loaded (so you can determine which modules should be loaded).

This thread deals with a scenario that might be useful for you.

Take into account that Prism-v2 was shipped before Visual Studio 2010 and Silverlight 4, so there is no specific guidance for them (yet). The common way to create a Prism solution for Silverlight is explained here.

Please let me know if this helps.

Damian Schenkelman

Feb 4, 2010 at 9:34 PM


Thank you very much! Your links and thoughts was just what I needed. Thanks again.