Silverlight Brass Tacks

Bill Reiss' Silverlight Ramblings
My upcoming Silverlight book for beginners Hello! Silverlight 2 with Dave Campbell, available online now!



Pages

Recent posts

Navigation

Archive

Blogroll

Tampa Divorce Lawyer

North of Tampa in Lutz, Florida. A Tampa Divorce Lawyer focusing on family, divorce, and real estate law.

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

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.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
Posted: Jul 18 2008, 12:06 by Bill Reiss | Comments (18) RSS comment feed |
  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under:

Related posts

Comments

geekswithblogs.net said:

pingbackPingback from geekswithblogs.net

Silverlight Cream for July 21, 2008 -- #330

# July 21 2008, 07:20

sparklingclient.com said:

pingbackPingback from sparklingclient.com

Samples from the Silverlight community

# July 24 2008, 16:05

Robert Burke ca said:

Robert BurkeThis is great... if only I could figure out how to get it to add the entire directory structure of my Deep Zoom output in one go!

# August 07 2008, 07:22

Bill Reiss us said:

Bill ReissRobert,

Ah good point...how does this work, do you create subfolders in Silverlight Streaming? I haven't seen anything more than one level deep.

# August 07 2008, 07:29

Robert Burke ca said:

Robert BurkeHi Bill - I honestly don't know - I haven't yet uploaded a Deep Zoom application. Through the web-based interface, I think it expects subfolders in the zip file that you are uploading. I think..

# August 07 2008, 09:35

Bill Reiss us said:

Bill ReissYeah it looks like it needs to be in a zip file, I'll see what I can do about automatically packaging up a folder in a zip and uploading it.

# August 11 2008, 07:56

Rob Burke ca said:

Rob BurkeCheers Bill, that would be great. It took me all night (literally) to upload the Deep Zoom directory structure for the DeepLOL on my blog!

# August 11 2008, 08:28

Ian Blackburn gb said:

Ian BlackburnHi Bill,

This is great - thanks.

I have a large deep zoom app (1.3GB) that I have been trying to upload (unsuccessfully) via the SLS web ui. I zipped it up but the web ui shows no progress so you are left watching the web page for a looong time (on my home connection Wink.

I think uploading such a large single file is possibly problematic with the api too, so it would be cool if the app could just create the folders and upload the files one by one, or at least folder by folder?

I hope to have a play with this using your code as a basis - I'll post back if I make any progress.

Kind regards,

Ian

# August 17 2008, 01:08

Bill Reiss us said:

Bill ReissIan,

I pretty much have this working, I'll have a new post in a couple of days with a new version that does this file by file. It's not as simple as you would think, and I had to ping the Silverlight Streaming devs a couple of times for some features that aren't documented yet. So hang in there Smile

Bill

# August 17 2008, 01:47

mgalinks.wordpress.com said:

pingbackPingback from mgalinks.wordpress.com

2008 September 09 - Links for today « My (almost) Daily Links

# September 08 2008, 20:00

games said:

gamesthanks you very googd web log

# October 16 2008, 06:07

oyun gb said:

oyunthanks very good

# November 07 2008, 01:40

SEO Test us said:

SEO TestYes thanks for share, by now i upload a large with the Silverlight Streaming API

# December 05 2008, 04:54

Busby SEO Test us said:

Busby SEO Testwhoa! great post

# December 23 2008, 21:56

Hectic Capiznon Bloggers 2009 ph said:

Hectic Capiznon Bloggers 2009Very useful and informative I will try to use this. But where can i find a software of silverlight streaming?

# March 12 2009, 17:10

sohbet said:

sohbetthank u
great post
love u all

# April 29 2009, 06:58

VBRocks us said:

VBRocksBill, I'm trying to do this with a Windows Form app, and it is not working. Even with Pre-Authentication, I still get the same error: "This request requires buffering data to succeed."

If you wouldn't mind helping me, I would greatly appreciate it! Because I'm stumped! Looking all over the internet for help...


Thanks!

VBRocks.

# May 26 2009, 10:32

democray trrorism co said:

democray trrorismthjank u sir

# June 07 2009, 09:32