Last post Nov 02, 2010 09:23 AM by atconway
Nov 02, 2010 07:03 AM|frazms|LINK
In my application user upload movies and the size of movies can be around 100MB or more. For this reason im doubtful that if any user have a slow connection it could take hours and if it takes so much time then my application session will be expired. What
should i do to cater this issue? My application is on ASP.Net MVC2 with C# and hosted on Windows server 2008
Nov 02, 2010 07:59 AM|XIII|LINK
if you have files to upload that exceed several Mb in size, the default in ASP.NET's btw 4Mb total form size, then I suggest you don't use the upload anymore but provide ftp access to your endusers. Uploading such a big amount of data's insane over standard
Nov 02, 2010 08:03 AM|mathi.nb|LINK
Nov 02, 2010 09:23 AM|atconway|LINK
Another flexible and scalable option is to create a WCF service that allows streaming. I have done this myself, and continued to use the HTTP protocol for data transfer, but broke through the 2GB ceiling imposed by IIS as I hosted it in a Windows Service.
For testing purposes only, I streamed a 13GB database backup in <5 minutes via a web interface.
Now, while uploads of that size are not the norm, it proves that using streaming with WCF is a viable option, especially for something like a 100mb file. When you stream with WCF, you don't have that local disk caching of the file (in ASP.NET temp folder) like
you do with native ASP.NET which makes it faster. You would still need to consider
increasing the ASP.NET session timeout for slow connections, but even the default 20 minutes is plenty for even larger size files like yours over a decent connection. You could even check the size of the file at runtime, and make session timeout or WCF
binding adjustments if required.
Take a look at the following links which should give you some more information:
Large Data and Streaming:
How to: Enable Streaming:
Streaming Message Transfer:
Hope this helps!