Click here to Skip to main content
15,911,360 members
Home / Discussions / C#
   

C#

 
GeneralRe: Help on Dialog Pin
dell2242-Jun-09 21:29
dell2242-Jun-09 21:29 
QuestionUPS API shipping Pin
Franklinlloyd2-Jun-09 4:50
Franklinlloyd2-Jun-09 4:50 
AnswerRe: UPS API shipping Pin
Colin Angus Mackay2-Jun-09 5:13
Colin Angus Mackay2-Jun-09 5:13 
AnswerRe: UPS API shipping Pin
Christian Graus2-Jun-09 10:48
protectorChristian Graus2-Jun-09 10:48 
Questionunbound field in C# Pin
behzadcp2-Jun-09 4:32
professionalbehzadcp2-Jun-09 4:32 
QuestionC# RSA Pin
budala1232-Jun-09 4:19
budala1232-Jun-09 4:19 
AnswerRe: C# RSA Pin
Ennis Ray Lynch, Jr.2-Jun-09 4:41
Ennis Ray Lynch, Jr.2-Jun-09 4:41 
AnswerRe: C# RSA Pin
Henry Minute2-Jun-09 4:43
Henry Minute2-Jun-09 4:43 
GeneralRe: C# RSA Pin
budala1232-Jun-09 5:18
budala1232-Jun-09 5:18 
GeneralRe: C# RSA Pin
Henry Minute2-Jun-09 5:32
Henry Minute2-Jun-09 5:32 
GeneralRe: C# RSA Pin
budala1232-Jun-09 6:02
budala1232-Jun-09 6:02 
GeneralRe: C# RSA Pin
Henry Minute2-Jun-09 6:08
Henry Minute2-Jun-09 6:08 
QuestionImport Data from CSV into Datatable Pin
polishprogrammer2-Jun-09 4:16
polishprogrammer2-Jun-09 4:16 
AnswerRe: Import Data from CSV into Datatable Pin
dan!sh 2-Jun-09 4:31
professional dan!sh 2-Jun-09 4:31 
QuestionGetting 530 error while downloading files from FTP Pin
avi_dadi20022-Jun-09 4:06
avi_dadi20022-Jun-09 4:06 
Hi All,
While downloading files from FTP server using WEBClient class, I'm able to download first file (while looping through all the files)to my local system after that i'm getting the error "The remote server returned an error: (530) Not logged in".

The credentials are correct as the first file is getting downloaded successfully

Following is the code

FileInfo fi = new FileInfo(strFileName);
if (!fi.Extension.ToLower().Equals(".csv")) return false;

if (serverUri.Scheme != Uri.UriSchemeFtp)
{
return false;
}

// Get the object used to communicate with the server.
using (WebClient request = new WebClient())
{

//request.Proxy = null;
//request.BaseAddress = serverUri.ToString();
// This example assumes the FTP site uses anonymous logon.
string strUsername, strPassword;
strUsername = this.FtpUserName;
strPassword = this.FtpPassword;
request.Credentials = new NetworkCredential(strUsername, strPassword);
string strListeningDir = "";
strListeningDir = this.ListeningDirectory;

strFileName = this.FileName;
try
{

Logger.Write(serverUri.ToString());
newFileData = request.DownloadData(serverUri.ToString().Trim());
fileString = System.Text.Encoding.UTF8.GetString(newFileData);
FileStream fs = new FileStream(strListeningDir + strFileName, FileMode.Create);
fs.Write(newFileData, 0, newFileData.Length);
Logger.Write("File copied to listening directory...");
fs.Close();
GC.Collect();

}
catch (WebException e)
{
throw e;
}
}
return true;
AnswerRe: Getting 530 error while downloading files from FTP Pin
EliottA2-Jun-09 5:22
EliottA2-Jun-09 5:22 
Questionclient/server application Pin
tek 20092-Jun-09 4:01
tek 20092-Jun-09 4:01 
AnswerRe: client/server application Pin
dan!sh 2-Jun-09 4:20
professional dan!sh 2-Jun-09 4:20 
GeneralRe: client/server application Pin
EliottA2-Jun-09 5:24
EliottA2-Jun-09 5:24 
GeneralRe: client/server application Pin
tek 20092-Jun-09 6:17
tek 20092-Jun-09 6:17 
GeneralRe: client/server application Pin
EliottA2-Jun-09 6:49
EliottA2-Jun-09 6:49 
GeneralRe: client/server application Pin
tek 20092-Jun-09 22:06
tek 20092-Jun-09 22:06 
QuestionDependencies error while creating Setup file in C# Windows application Pin
Mads1152-Jun-09 3:07
Mads1152-Jun-09 3:07 
AnswerRe: Dependencies error while creating Setup file in C# Windows application Pin
Ahmed Khallaf2-Jun-09 3:22
Ahmed Khallaf2-Jun-09 3:22 
GeneralRe: Dependencies error while creating Setup file in C# Windows application Pin
Mads1152-Jun-09 3:30
Mads1152-Jun-09 3:30 

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.