Is it possible to build a SL application with RIA class library without the .web project.
I mean the Business will be hosted on the RIA class library, do I still need the first generated .web for my SL project?
Best regards
You can create them separately - the key bit is the 'WCF RIA Services Link' which you'll set on your Silverlight project once your RIA web app is around for it to use:
http://msdn.microsoft.com/en-us/library/ee707372(VS.91).aspx
Related
I need some advice about using WCF or DLL in my program. I am developing a program that will be Desktop App and Web App. The architecture is multi tiers. What should I do in Bussiness layer, should I just make it as a namespace and build it to be a dll then in my Desktop App and Web App I add reference this dll OR should I make the business layer be a web service, then I can use in my apps. What I have to consider when using a web service instead of dll.
Just to get started you could create one Solution that includes:
Business logic project
Web App project
Desktop project
Web App project and Desktop project will just reference your Business logic project. Then(if needed) you could continue to separate Business logic project to e.g. Data Access project, Service Layer project etc.
Then if you will feel that you need "real" WCF service it would be easy to create one from your decoupled architecture.
You should use restful service like http webapi which has broad reach of clients
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?
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
I use domain service, both of my Silverlight library projects are linked to same WCF RIA service.
When I added both libraries to the same Silverlight application, this error was raised.
The type 'KhorasanMIS.Web.Services.Workflow.DSWorkflow' exists in both 'D:\KhorasanMIS\KhorasanMIS\KhorasanMISControls\Bin\Debug\KhorasanMISControls.dll' and 'D:\KhorasanMIS\KhorasanMIS\WorkflowLibrary\Bin\Debug\WorkflowLibrary.dll' D:\KhorasanMIS\KhorasanMIS\Workflow\Models\General\MWorkState.cs'
The libraries you added to your Silverlight project contain references to dlls also referenced in your main Silverlight project?
in the class library projects in visual studio solution explorer > right click on the problem references and click on properties > set Copy Local to false.
I am developing Silverlight application with Prism 4 and WCF RIA service.
I had searched on google to get sample explaining this, but failed to get any successful output.
I am confuse about how to use RIA service in PRISM Application.
Please suggest any link which provide sample for this.
Help me.
You can use WCF RIA and PRISM 4 to develop a Silverlight application. Each of the technologies is targeted at a different part of your application.
WCF RIA services provides you with the tools to communicate from client to server to persist your data.
PRISM4 is designed to allow you to construct modular well architected Silverlight (and WPF) applications.
I have a large LOB application built using this approach. I use PRISM4 modularity to load modules into my application. The viewmodels in each of the modules connect to WCF RIA domain service contexts to get and modify data.
I'd recommend looking at Nikhilk's Book Club sample application for the RIA side http://www.nikhilk.net/RIA-Services-MIX10-Slides-Code.aspx.
I am working on a Silverlight application that uses WCF. I need to have my WCF project separate from the ASP.Net application that will host my Silverlight project. I am looking for some guidance on how I should organize my solution and list gotchas other people have experienced during debugging and deployment.
Specifically my questions are
What type of project should I use for the WCF service?(A WCF project, an ASP.NET project with self-hosted WCF services, something else)
What do I need to so to get it so that when I press F5 I can debug both my Silverlight project and my WCF service? Will I need a cross-domain policy just to debug the thing?
Some background info on why I want to do this:
I have legacy web application that I am gradually converting over to a Silverlight application. Because it is a large web application some of its features will be converted to Silverlight before others.
The legacy web application has lots of code in it that is no longer used. Much of the code that is no longer used references 3rd part assemblies. This is why I want to get rid of the old web application. So obviously I don't want to host WCF services that will be kept for future versions in it. That is my reason for wanting to make the WCF project separate.
We're doing the exact same thing.
We're using a WCF project just in case we have to change how it's hosted in the future. (I.E. no longer using IIS)
2.a. You can have a solution with your silverlight projects, and your wcf project. The silverlight project will have a service reference to the wcf service in your solution. That allows you to debug using F5. However, when you go to deploy, you will have to change your app.config service URIs to refer to your production location.
2.b. You will only need a cross-domain policy file if your fully qualified domain names are different for the wcf service and the silverlight app. Ours happen to be different. Here is an excellent article on when to use the policy file: Clicky
Good luck!
Just remember that when you get ready to deploy, if your service is going to be hosted on a different machine than your app, you need to deploy the service first. Then re-configure your service reference, and finally re-compile your Silverlight before deploying. Otherwise, your Silverlight app will look for the service on your local machine instead of where you deploy it.