Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
GeneralRe: Webbrowser component Pin
Aditya Baraya31-Mar-08 21:55
Aditya Baraya31-Mar-08 21:55 
GeneralRe: Webbrowser component Pin
bdiepeveen31-Mar-08 22:54
bdiepeveen31-Mar-08 22:54 
QuestionImage Processing Lab Doubt Pin
billaprem31-Mar-08 20:13
billaprem31-Mar-08 20:13 
QuestionWaking a thread.. Pin
ptr2void31-Mar-08 20:06
ptr2void31-Mar-08 20:06 
GeneralRe: Waking a thread.. Pin
K.L.K7-Apr-08 14:35
K.L.K7-Apr-08 14:35 
QuestionCheck digit calculation Pin
D i x y31-Mar-08 19:59
D i x y31-Mar-08 19:59 
GeneralRe: Check digit calculation Pin
Eduard Keilholz31-Mar-08 21:09
Eduard Keilholz31-Mar-08 21:09 
QuestionProblem while uploading file on FTP server Pin
pavya_Cool31-Mar-08 19:50
pavya_Cool31-Mar-08 19:50 
Hi All,

I am working on FTP uitility using C#. I have build a class for that using C#. But while uploading the file on FTP i am unable to upload whole file on the FTP. Only part of that file is uploaded. I have used the following code to upload the file.

--------------------------------------------------------------------------

public void UploadData(string FTPUri, string FilePath, string FileName, string UserName, string Password)
{
FtpWebRequest reqFTP;
reqFTP = (FtpWebRequest)FtpWebRequest.Create(FTPUri+FileName);
reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
reqFTP.UseBinary = true;
reqFTP.Credentials = new NetworkCredential(UserName, Password);
StreamReader ReadStream = new StreamReader(FilePath);
string ftpResponse = ReadStream.ReadToEnd();
ReadStream.Close();
reqFTP.ContentLength = ftpResponse.Length;
StreamWriter ftpStream = new StreamWriter(reqFTP.GetRequestStream());

ftpStream.WriteLine(ftpResponse);

ftpStream.Close();

ftpStream.Close();
}


--------------------------------------------------------------------------

Here i am able to upload only part of that file. Can anybody tell me what is the problem?

Thanking you.

Pravin

AnswerRe: Problem while uploading file on FTP server Pin
JABIR E14-May-08 20:21
JABIR E14-May-08 20:21 
GeneralPass Arguments to Button Click event Pin
karthik_dotnet131-Mar-08 19:18
karthik_dotnet131-Mar-08 19:18 
Questionhow to import GIF file into datagrid Pin
palanirajan31-Mar-08 18:15
palanirajan31-Mar-08 18:15 
QuestionBuilding a pc remote control? Pin
Goalie3531-Mar-08 17:18
Goalie3531-Mar-08 17:18 
GeneralI'm confused about Sockets again... Pin
Jordanwb31-Mar-08 15:50
Jordanwb31-Mar-08 15:50 
QuestionVisually comparing filestreams/strings Pin
testdi31-Mar-08 13:00
testdi31-Mar-08 13:00 
GeneralIEdge cant be an IEdge Pin
Gareth H31-Mar-08 10:30
Gareth H31-Mar-08 10:30 
GeneralRe: IEdge cant be an IEdge Pin
led mike31-Mar-08 10:44
led mike31-Mar-08 10:44 
QuestionButton Click event with "RenderControl" Pin
wagswvu31-Mar-08 10:13
wagswvu31-Mar-08 10:13 
GeneralRe: Button Click event with "RenderControl" Pin
Jesse Squire31-Mar-08 11:22
Jesse Squire31-Mar-08 11:22 
GeneralRe: Button Click event with "RenderControl" Pin
wagswvu31-Mar-08 11:46
wagswvu31-Mar-08 11:46 
GeneralRe: Button Click event with "RenderControl" Pin
Jesse Squire31-Mar-08 12:44
Jesse Squire31-Mar-08 12:44 
GeneralPopulation dropdown menu on keyboard navigation Pin
AndrusM31-Mar-08 7:10
AndrusM31-Mar-08 7:10 
GeneralRe: Population dropdown menu on keyboard navigation Pin
Alan N31-Mar-08 8:36
Alan N31-Mar-08 8:36 
GeneralRe: Population dropdown menu on keyboard navigation Pin
AndrusM31-Mar-08 9:08
AndrusM31-Mar-08 9:08 
GeneralRe: Population dropdown menu on keyboard navigation Pin
Alan N1-Apr-08 2:42
Alan N1-Apr-08 2:42 
Generalmanaging e-mail attachments question Pin
kknepple31-Mar-08 6:16
kknepple31-Mar-08 6:16 

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.