Uploading large files with the Silverlight Streaming API
In my last post, I provided a sample app and class library to integrate with the Silverlight Streaming API which is a REST based HTTP interface to Silverlight Streaming. I received some feedback that people were having trouble with large files, specifically large WMV videos. It seems that the transfer was timing out at about a minute.
What follows is my problem resolution on this, I thought that maybe detailing the process might help some others.
I was able to get past the one minute barrier by specifying a larger value for the HttpWebRequest.Timeout property. This led to another issue where the upload was timing out after 5 minutes. The ReadWriteTimeout value seemed suspicious, since the default value was 5 minutes. However when I set this, it didn't help. So on to try something else.
Next I tried to set AllowWriteStreamBuffering to false, and then I got the following error:
This request requires buffering data to succeed.
Then I ran across this article:
http://support.microsoft.com/kb/908573
Basically when AllowWriteStreamBuffering is false and you're using authentication you need to pre-authenticate the request. After this change, it seems like the 5 minute barrier is gone.
Please let me know if you still see issues with large requests, I have updated the sample with source code at:
http://www.bluerosegames.com/slsexplorer.zip
I have also noticed that you can upload all sorts of files, not just video files and make them available, more on that in a later post.