Exchanging data between MVC 2 asp.net 3.5 and Silverlight 4 - silverlight

I wrote an application using RIA services in a .net 4.0 project that used domain services to communicate with a client-side Silverlight 4 application. By the way this is my first data driven Silverlight.
I just found out that I will need to make it run in a MVC2 project running .net 3.5 on the server.
Is it possible to make RIA services work in 3.5?
If not, what would be the best way to recreate the project in 3.5?

Unfortunately this scenario is not going to work. Your choices are either host the server on .NET 4.0 or backport with .NET 3.5, SL3 and Beta2 of RIA Services.

Related

Dependency Injection in WPF and Asp.Net Core

I am using Asp.Net Core to write API Layer for one of my legacy application developed using WPF (.Net Framework 4.5). I have used https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection/ in Business layer which I want to access from WPF application. The version of this DI is not supported by .Net Framework 4.5 so I am unable to use it from WPF. Any suggestions how should I go with this ? The other approach is to use anyother DI container supported by .Net framework 4.5 and Asp.Net Core
I have upgraded my WPF project to .Net Framework 4.6 and rest of the layers are created using .Net Standard Library 2.0.

Can we use XBAP (WPF browser app) built using .net 3.5, on client machine having only .net 3.0

I have an XBAP application built using .net framework 3.5. It's published with full trust on a web server. I am able to use it on client machine having .net framework 3.5.
Question: can I also use this XBAP application on a client machine having only .net framework 3.0? That is no .net 3.5 on client machine.
Thanks in advance for help.
No.
.Net applications require the .Net runtime.
You cannot run a .Net 3.5 application in machine that does not have the .Net 3.5 runtime installed.

Use Sql Server FileStream in Silverlight application

In a silverlight applicaiton i use entity framework as Data Access Layer. I want to use FileStream Capability in Silverlight applicaiton , but entity framework does not support this.how can i implement this with or without entity framework in silverlight application?!!!
I found some excellent pointers on using SQL FILESTREAM and Silverlight + RIA Services in Chris Rouw's blog:
Storing Files in SQL Server using WCF RIA Services and Silverlight - Part 1
Storing Files in SQL Server using WCF RIA Services and Silverlight - Part 2
Part three available as well...
Pretty good answer to the question here.
Basically, you use an HTTP handler in ASP.Net to return the file over HTTP so Silverlight can download it and serve it up to the client. It is pretty hard to give you much more detail than this since your question is pretty vague.

How to upgrade from WCF RIA Service 1.0 to SP2 - Silverlight and Entity Framework

Can anyone provide a step by step guide for upgrading a VS2010 solution from RIA Services 1.0 + Silverlight 4 to RIA Services 1.0 SP2 + Silverlight 5?
My solution is set up in the normal fashion:
MyApp.Web - ASP.NET Server project (entity framework here)
MyApp - Silverlight client project (RIA Services "connects" this with MyApp.Web)
Here is what I have so far:
Uninstall WCF RIA Services Toolkit and WCF RIA Services V1.0 for VS2010
Install VS2010 SP1
Install Entity Framework 4.1
Install Silverlight 5 Tools (contains RIA Services 1.0 SP2)
Here is where I am lost. What do I do next? In particular:
What project references do I need to remove/add from my client and server projects?
to go from Entity Framework 4.0 to 4.1
to go from RIA Services 1.0 to RIA Services 1.0 SP2
to go from Silverlight 4 to 5
Anything else I am missing?
What do I need to do on my production server (running Win XP) where my solution is deployed to?
I remember installing .NET Framework 4.0 and RIA Services distributable (awhile back)
Thanks in advanced.
1.1 When I start a new Project and add a ADO.NET Entity Data Model it automatically adds the following assemblies:
System.Data.Entity
System.Runtime.Serialization
System.Security
So I would remove them from the Project and add them again just to make sure using the highest version.
1.2 There can be only one version of Ria on your machine. So your project automatically uses the last installed version.
1.3 Go to the Properties page of your Silverlight Project and open the Tab 'Silverlight'. Change the version to Silverlight 5 under Target Silverlight Version: Important note: If you have a large project this will take very VERY long to complete. Make yourself some coffee and wait. The UI can become unresponsive when changing it, however don't touch it. Even when you loose your patience. If you do abort than there will probably remain some faults in your .csproject file.
First point 3: Install the Silverlight 5 Tools also on your server along with the Entity FrameWork 4.1 this way it won't matter if your forgetting to set Copy Local to True for a new Silverlight assembly. ( Which means you won't have to republish again if you forgot. )
Point 2: Make sure your project works with the new installed versions by checking/doing the following things:
- Remove the bin and obj folders in both projects.
- Remove the hidden GenerateCode folder in your Silverlight Project.
- Make sure your own referenced assemblies are also targeting Silverlight 5.
- After ReBuilding when doing all of this I would do something that looks odd but has proven to solve stupid errors: In the properties page of your Silverlight project disable the WCF Ria Services link by setting it to <No Project Set> Build your project (resulting in a lot of errors, I know) Switch the link back and rebuild. Remember that Ria supports Complex-Object Serialization since SP1 which they wanted to be there from the first version but couldn't finish it in time. This can give you a headache if you included assemblies to the silverlight client that includes object types also existent on the server side.
Good luck and if you get any troubles than just ask.

Silverlight Business Application - ASP.Net MVC

My first question is, what is the difference between a normal Silverlight Application in Visual Studio VS. a Silverlight Business Application?!
My second question is, when I begin a new Silverlight Application Visual Studio asks whether I want to use an ASP.Net website to host the project, or an ASP.Net MVC project. HOWEVER, When I create a new Silverlight BUSINESS Application, Visual Studio does not let me specify which type of ASP.Net website I want to hose my application in and simply creates a normal ASP.Net project by default. Since I want to use ASP.Net MVC, is there a way of changing this so that I can use an MVC project by default? Or somewhere to specify which one I want to use!?
Kind regards.
Silverlight Business Application is a new template project made available through the .NET RIA Services framework.
I guess there is no out-of-the-box support for ASP.NET MVC since the .NET RIA Services only exists as a preview (which was released in july). This thread answers your questions, and it seems they are working on ASP.NET MVC support.
PS. I propose that you re-tag your question with [ria-services].

Resources