Restful WCF Data Service for uploading and downloading large files?
I am about to write a service that can upload and transfer large video files (GB) (in the future, it might not only be videos, but it might also be large documents.
I've researched so far and what really makes sense to me can be disabled:
WCF Data Services and implementation IDataServiceStreamProvider
, and on backend I want to migrate large files to SQL SERVER 2008 using new SQL Type FILESTREAM
.Looks just like I had to use some Win 32 APIs to access the file systemSafeFileHandle handle = SqlNativeClient.OpenSqlFilestream
Since WCF Data Services love to play with Entity Framework or Linq-To-SQL, which can be a streaming implementation, and is there support for the Filestream SQL Server type?
It's a plan, but I don't know how to put it together ... I was thinking about splitting large files and resuming and undoing.
For uploading: I'm not sure if you are using silverlight upload control or any other great ajax tool.
Could anyone point me in the right direction here ... or would think this is the way to go? Thoughts, links? It will be great...
a source to share
I did something where I was posting huge data files. I used these two examples to help write the code
http://msdn.microsoft.com/en-us/library/ms751463.aspx
http://www.codeproject.com/KB/WCF/WCFDownloadUploadService.aspx
This is a very important number to know 2147483647
a source to share
silverfighter: On IIS6 only, I was unable to configure WCF Data Services to send over 30MB stream over the network. I believe it is not built for large thread transactions. Just try to download a 27MB file and follow the w3wp process in question, you will be surprised at the amount of memory consumed.
The solution was to create a WCF service application hosted under its own w3wp process and only responsible for uploading / downloading via WCF. i recommend using the following project http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP
Hope this could help.
a source to share