-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: MVP_mayank
Message 1 in Discussion
Hi all,
.NET 2.0 has a new System.Net.FtpWebRequest API that I'm experimenting with.
I suppose the existing WebRequest API works about the same way.
In order to upload a file, samples show that you should write the entire
local file to the request stream, and then fire off the request by calling
GetResponse.
<pseudo>
Stream stm = req.GetRequestStream();
stm.Write(bytesOfFileData);
stm.Close();
Response resp = req.GetResponse();
</pseudo>
My concern is, if I upload a 1Gb file, I need to write it to a (presumably)
memory-based stream, and I'll run out of RAM.
Is there a pattern for this, how to elegantly "join" these streams, or is
this a deficiency in the API? I mean, really, my request stream is the file
on disk, there should be no need to read it into memory, just to pass it
over the network...
Am I missing something here? Maybe the request stream is really a direct
network stream, and the data goes straight to the server? If so, when are
headers sent?
Regards,
Mayank Pujara ([EMAIL PROTECTED])
Cool ringtones, snazzy logos! Expressive cards, fun games! Get it all at MSN mobile!
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]