Question

I have a silverlight application and uses wcf ria services. The question is about the options to host the wcf ria services.

In all the articles I read says, the RIA services should be hosted on the same web application where the silverlight app is hosted.

An alternative is , we can use WCF RIA class library, but still this need to be referenced in the silverlight web app where the silverlight is hosted.

I am wondering , for a cleaner implementation , can I host the WCF RIA services in any other web apps?

Was it helpful?

Solution

The default scenario for WCF RIA Services assumes that you will create your business objects to be shared between the server and the client within your web project, and these will be replicated within your Silverlight project.

However, this scenario doesn't create an ideal separate “middle tier” where your business objects are contained within a separate assembly that can then be reused between applications.

This is where the WCF RIA Services Class Library project template comes in. It is possible, however, to move the business logic out of the Web project and into a separate class library, using the WCF RIA Services Class Library project template. So you can have your entities and metadata classes in a separate project from your server project. But you must add a reference to it in your web project where the silverlight is hosted.

This is a reasonable thing

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top