Click here to Skip to main content
15,907,396 members
Home / Discussions / C#
   

C#

 
GeneralRe: excel factory update Pin
Jimmanuel6-Feb-08 7:39
Jimmanuel6-Feb-08 7:39 
GeneralRe: excel factory update Pin
arkiboys6-Feb-08 21:22
arkiboys6-Feb-08 21:22 
GeneralRe: excel factory update [modified] Pin
Jimmanuel7-Feb-08 3:48
Jimmanuel7-Feb-08 3:48 
Generala little more constructive criticism . . . Pin
Jimmanuel7-Feb-08 7:48
Jimmanuel7-Feb-08 7:48 
GeneralRe: a little more constructive criticism . . . Pin
arkiboys7-Feb-08 22:14
arkiboys7-Feb-08 22:14 
GeneralOracle too slow in .Net Pin
El'Cachubrey6-Feb-08 3:58
El'Cachubrey6-Feb-08 3:58 
JokeRe: Oracle too slow in .Net Pin
Not Active6-Feb-08 4:03
mentorNot Active6-Feb-08 4:03 
AnswerRe: Oracle too slow in .Net Pin
Guffa6-Feb-08 4:56
Guffa6-Feb-08 4:56 
GeneralRe: Oracle too slow in .Net Pin
El'Cachubrey6-Feb-08 7:55
El'Cachubrey6-Feb-08 7:55 
GeneralRe: Oracle too slow in .Net Pin
Guffa6-Feb-08 8:17
Guffa6-Feb-08 8:17 
GeneralRe: Oracle too slow in .Net Pin
Ennis Ray Lynch, Jr.6-Feb-08 7:34
Ennis Ray Lynch, Jr.6-Feb-08 7:34 
GeneralRe: Oracle too slow in .Net Pin
El'Cachubrey6-Feb-08 7:50
El'Cachubrey6-Feb-08 7:50 
AnswerRe: Oracle too slow in .Net Pin
Guffa6-Feb-08 8:10
Guffa6-Feb-08 8:10 
GeneralHtml to Pdf Pin
marky7776-Feb-08 3:46
marky7776-Feb-08 3:46 
GeneralRe: Html to Pdf Pin
sabrown1006-Feb-08 7:30
sabrown1006-Feb-08 7:30 
GeneralFTP check for existing files Pin
Dreamzor6-Feb-08 3:44
Dreamzor6-Feb-08 3:44 
GeneralRe: FTP check for existing files Pin
Not Active6-Feb-08 4:01
mentorNot Active6-Feb-08 4:01 
GeneralRe: FTP check for existing files Pin
Dreamzor6-Feb-08 4:21
Dreamzor6-Feb-08 4:21 
i use a method that looks like this

public bool upload(string fileName)
{


FileInfo fileInf = new FileInfo(fileName);
string uri = "ftp://" + FtpServerIP + "/" + fileInf.Name;
FtpWebRequest reqFTP;

reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + FtpServerIP + "/" + fileInf.Name));
reqFTP.Credentials = new NetworkCredential(FtpUserID, FtpPassword);
reqFTP.KeepAlive = false;
reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
reqFTP.UseBinary = true;
reqFTP.ContentLength = fileInf.Length;
if (fileInf.Exists)
{
return false;
}
else
{
int buffLenght = 20482;
byte[] buff = new byte[buffLenght];
int contentLen;

FileStream fs = fileInf.OpenRead();
try
{
Stream strm = reqFTP.GetRequestStream();
contentLen = fs.Read(buff, 0, buffLenght);

while (contentLen != 0)
{
strm.Write(buff, 0, contentLen);
contentLen = fs.Read(buff, 0, buffLenght);
}
strm.Close();
fs.Close();
return true;
}
catch (Exception ex)
{

MessageBox.Show(ex.Message, "Upload Error");

}
}
return true;
}

how do i implement what u suggested correcly ?
GeneralRe: FTP check for existing files Pin
Not Active6-Feb-08 4:35
mentorNot Active6-Feb-08 4:35 
GeneralRe: FTP check for existing files Pin
Dreamzor6-Feb-08 4:46
Dreamzor6-Feb-08 4:46 
GeneralRe: FTP check for existing files Pin
Not Active6-Feb-08 4:59
mentorNot Active6-Feb-08 4:59 
Questionhow to close a socket Pin
sindhutiwari6-Feb-08 3:15
sindhutiwari6-Feb-08 3:15 
GeneralRe: how to close a socket Pin
Justin Perez6-Feb-08 3:20
Justin Perez6-Feb-08 3:20 
GeneralRemote Connection Pin
Pooya Musavi6-Feb-08 3:15
Pooya Musavi6-Feb-08 3:15 
GeneralRe: Remote Connection Pin
DaveyM696-Feb-08 3:51
professionalDaveyM696-Feb-08 3:51 

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.