Silverlight MediaElement source from a WCF - silverlight

I have a Wcf that is reading and writing in a database, and then send the results to a silverlight web page
what i want is to read the path of a movie in the database and play it in the silverlight page
if anyone have an idea how to make this to work i would appreciate
thanks ;)

Streaming Media Content Over WCF RESTful Service
Related Reading:
Streaming Message Transfer
How to: Enable Streaming
Large Data and Streaming

Related

How to get the data from mysql database without using webservices like WCFin silverlight application

Is there any other ways so i can get the data from mysql database to show in a datagridview in a Silverlight application without using Webservice like WCF webservice .?
Silverlight is a client side web technology and as such cannot access a database directly. Web services are normally the best way to access the data you want but I guess you could get creative using an elevated trust application and reading from the file system in some kind of hacky way but that's not going to be a good idea!

IIS and WPF video streaming

I need someone to point to right direction in both silverlight in WPF video streaming.
I have two projects, one is a Silverlight web page and the other is a WPF project. The goal is, on the WPF application the user is able to upload a video to the server, and the Silverlight web page streams it using a any web protocol (most likely http).
I'm using Expression Encoder SDK to build the code that re-encodes the video files (since the original video files will be very big, over 1gb each), and so far I think I've got it right, but now I need to stream it on the web, and I'm not being able to do so.
The silverlight web page is hosted on a Windows Server 2008 R2 with IIS 7.0.
I've been reading about IIS streaming, but everything I find points that every time the user wants to add a video, it must go to IIS interface and add it manually, and that cannot be the only way, since the user knows nothing about IIS.
If possible I would like some code examples on how to achieve streaming through IIS, and some pointer on what I could do, or am doing wrong...
Thanks
I dont see why user have to manually do it everytime in IIS. From your WPF app, make it store your video in a specific location inside your IIS. Also do a one time configuration in your IIS to deliver the video extension you are uploading, if its mp4 or wmv, give it the MIME type, "application/octet-stream", so when a user requests it, it will be delivered by IIS.
No, configure your silverlight app to read the file from your IIS directory (you must be knowing the filename it got saved in IIS in the first place.)
If you need to have a "streaming" experience, IIS won't be enough, you will have to use a streaming server like windows media server or flash media server.
Hope this helps.

Send simple data from wp7 to winforms application

I want to send simple data (geolocation data to be precise) from Windows Phone 7 application to a windows forms application and use it, as I'm a total beginner in this field I don't know which tools to use.
I searched about wcf services and tested this method but there's some issues: the data is sent from the phone application but isn't sent to the winforms application (guess something is missing)
If your know how to do this in a quick way, or have good tutorials I'll be thankful.
EDIT
I found this tutorial, it show how to connect directly wp7 application and desktop application without using sockets neither wcf service, I'm wondering if it is really works if the application isn't in localhost.
the like for the tutorial: wp7 tutorial
I had a similar problem and so I created a REST/JSON WCF service hosted in IIS with AppHarbor to provide the data. There's hundreds of ways to do it (Ruby/Heroku, etc..), but that particular one fits well within the Microsoft stack. I also needed to share route data and I used the WCF service to wrap the BingMaps services so that route computations are cached and shared. Considering that I had already created a local model, moving it out of my phone project into a service took less than a few hours (including the usual config hiccups, and forgetting to add the appharbor user to my bitbucket repo).
Consuming the service from WinForms (or any client) shouldn't be an issue as the service knows nothing about the client implementation.
Here's a tutorial from code project. REST WCF Service with JSON
I think you would need to implement some sort of server side solution which you could upload to on your Windows Phone and download from on your Windows Form application. This could be achieved using a WCF service which was connected to a server side database.
Another option would be to use sockets and communicate directly with your WinForms application. Check this tutorial on how to use basic sockets on WP7.

Asp.Net wcf vs ftp vs httphandler for file upload

In my application i have to upload large files. Its a silverlight application which uploads the file using internet to some server. The application is installed on client machine. I was searching out for options that i can have. Any suggestion on which one would be better between WCF, FTP, Httphandler and why. I am using .Net 4.0 and save the file to Sql using SqlFileStream.
The question really is: what problem are you trying to solve?
WCF is out of question since even if you get the browser to talk to a WCF service, it would have to be sitting on the top ASP.NET and doing what a simple ASP.NET page can.
Browser cannot upload FTP so that is out of question as well.
HttpHandler is an option but does not provide a benefit for uploads so you could use it but you might as well use a simple ASP.NET page.
Your main problems (and their solutions) are:
ASP.NET is configured to accept up to 4 MB so you have to change configuration to allow more.
To get a reliable upload, you need to implement a chunked uploading at client side using Silverlight or Flash but you do not seem to be going that route.
Update
Based on your updates, I would recommend chunked uploading using SilverLight on Client and HttpHandler on the server.

SIlverlight and WCF RIA

I have an application where I present the data to the users by using Silverlight 4 and WCF RIA Services. In this application I have also a module (console app) which is responsible to store in the DB some flat files (xml files).
My question is: According to the best practices which one of these two options is the best?
Reuse the WCF RIA Services also for the Console App to store the flat files in DB.
Create others WCF Services specific for the Console App to store the flat files in DB (with ServiceContract).
Any idea? Or other options?
THANKS!
All I can say is it is always a best practice to reuse any code that can be reused. I don't see why you would want to create a whole new service layer for another application? Being reusable (over multiple applications/platforms) is the point of web services.

Resources