Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to get names and count of tables Pin
PIEBALDconsult7-Feb-12 2:32
mvePIEBALDconsult7-Feb-12 2:32 
AnswerRe: how to get names and count of tables Pin
Abhinav S6-Feb-12 19:10
Abhinav S6-Feb-12 19:10 
QuestionGarbage collection & nested objects? Pin
SledgeHammer016-Feb-12 11:17
SledgeHammer016-Feb-12 11:17 
AnswerRe: Garbage collection & nested objects? Pin
Eddy Vluggen6-Feb-12 11:38
professionalEddy Vluggen6-Feb-12 11:38 
AnswerRe: Garbage collection & nested objects? Pin
harold aptroot6-Feb-12 11:41
harold aptroot6-Feb-12 11:41 
AnswerRe: Garbage collection & nested objects? Pin
Luc Pattyn6-Feb-12 11:51
sitebuilderLuc Pattyn6-Feb-12 11:51 
GeneralRe: Garbage collection & nested objects? Pin
SledgeHammer016-Feb-12 11:55
SledgeHammer016-Feb-12 11:55 
QuestionHow to implement multi-part FTP Pin
Michael J. Eber6-Feb-12 8:35
Michael J. Eber6-Feb-12 8:35 
We have a need to send very large files to an internal FTP server. These files are videos that may last as long as an hour. All of the FTP sample I find have the standard code in them:
C#
request.Method = WebRequestMethods.Ftp.UploadFile;
 
request.Timeout = CONNECTION_TIMEOUT;
 
request.ReadWriteTimeout = CONNECTION_TIMEOUT;
 
request.UsePassive = false;
 
//Set credentials if necesary
 
if (credentials != null)
 
request.Credentials = credentials;
 
//Read source file
 
StreamReader sourceStream = new StreamReader(source);
 
byte[] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd());  //<--- this is where we bomb!
 
sourceStream.Close();
 
request.ContentLength = fileContents.Length;
 
//Send contents
 
Stream requestStream = request.GetRequestStream();
 
requestStream.Write(fileContents, 0, fileContents.Length);
 
requestStream.Close();


This logic gives us an out-of-memory condition with very large files. What I'd like to do is have it send the file as a multi-part file sent as small chunks instead of a single large stream.

Does anyone know how this is implemented?
Software Zen: delete this;

AnswerRe: How to implement multi-part FTP Pin
Luc Pattyn6-Feb-12 8:40
sitebuilderLuc Pattyn6-Feb-12 8:40 
GeneralRe: How to implement multi-part FTP Pin
Michael J. Eber6-Feb-12 15:05
Michael J. Eber6-Feb-12 15:05 
AnswerRe: How to implement multi-part FTP Pin
Luc Pattyn6-Feb-12 15:34
sitebuilderLuc Pattyn6-Feb-12 15:34 
AnswerRe: How to implement multi-part FTP Pin
BobJanova6-Feb-12 22:16
BobJanova6-Feb-12 22:16 
Question[Posted in ASP.Net forum] Bug Tracking for ASP.Net Website Pin
Ed Nutting6-Feb-12 2:23
Ed Nutting6-Feb-12 2:23 
AnswerRe: Bug Tracking for ASP.Net Website Pin
Richard MacCutchan6-Feb-12 3:06
mveRichard MacCutchan6-Feb-12 3:06 
GeneralRe: Bug Tracking for ASP.Net Website Pin
Ed Nutting6-Feb-12 3:16
Ed Nutting6-Feb-12 3:16 
GeneralRe: Bug Tracking for ASP.Net Website Pin
Richard MacCutchan6-Feb-12 4:07
mveRichard MacCutchan6-Feb-12 4:07 
GeneralRe: Bug Tracking for ASP.Net Website Pin
Ed Nutting6-Feb-12 5:14
Ed Nutting6-Feb-12 5:14 
AnswerRe: Bug Tracking for ASP.Net Website Pin
Eddy Vluggen6-Feb-12 5:06
professionalEddy Vluggen6-Feb-12 5:06 
GeneralRe: Bug Tracking for ASP.Net Website Pin
Ed Nutting6-Feb-12 5:13
Ed Nutting6-Feb-12 5:13 
GeneralRe: Bug Tracking for ASP.Net Website Pin
Eddy Vluggen6-Feb-12 5:33
professionalEddy Vluggen6-Feb-12 5:33 
GeneralRe: Bug Tracking for ASP.Net Website Pin
Ed Nutting6-Feb-12 5:47
Ed Nutting6-Feb-12 5:47 
AnswerRe: Bug Tracking for ASP.Net Website Pin
Eddy Vluggen6-Feb-12 7:14
professionalEddy Vluggen6-Feb-12 7:14 
Questionwebsite performance Pin
IMQ6-Feb-12 1:15
IMQ6-Feb-12 1:15 
AnswerRe: website performance Pin
J4amieC6-Feb-12 1:51
J4amieC6-Feb-12 1:51 
GeneralRe: website performance Pin
IMQ6-Feb-12 20:38
IMQ6-Feb-12 20:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.