what does ReadWriteTimeout really mean

M

MAggIK

Hi,

I'm developing an application, that uploads and downloads files
using httpwebrequests. I've encountered some problems considering
timeouts while uploading large files.
I wanted to know what exactly does readwritetimeout mean... is it
the time in which I need to upload the whole file? At first I thought
so,
but this property is set to 5 minutes, and I've managed to upload some
large files and that took more than 5 minutes for sure. The problem is
sometimes I get a timeout and sometimes I don't. How is that possible?


The effect I'd like to get is the ability to upload files of
"infinite" size
even with a very slow internet connection... ie. if a user wants to
upload a 4GB iso and his connection has a 5kB/s upload limit I want
him
to be able to do that no matter if it takes even a few days.
The other thing is that when during the upload the internet connection
goes down, I'd like to stop the upload and provide the user with
proper information. Is this possible?
I know that it is unlikely that someone with a bandwidth of 5kB/s
will succeed in uploading a 4GB iso, but I wouldn't like the user
to blame my application for that.
 
J

Jon Skeet [C# MVP]

The effect I'd like to get is the ability to upload files of
"infinite" size
even with a very slow internet connection... ie. if a user wants to
upload a 4GB iso and his connection has a 5kB/s upload limit I want
him
to be able to do that no matter if it takes even a few days.

In that case I strongly suggest you do it with your own protocol which
effectively splits the upload into smaller chunks, and can restart
from any position (or use FTP, which allows that).
The other thing is that when during the upload the internet connection
goes down, I'd like to stop the upload and provide the user with
proper information. Is this possible?

Absolutely - just not off the shelf. You'll have to detect that
posting a particular chunk failed, and then back off for a while, etc.

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top