Click here to Skip to main content
15,893,337 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: Dependencies error while creating Setup file in C# Windows application Pin
Searril2-Jun-09 4:55
Searril2-Jun-09 4:55 
Questionhow do I detect a mouse down in a DataGridView that is not over a cell? Pin
Dan Neely2-Jun-09 2:54
Dan Neely2-Jun-09 2:54 
AnswerRe: how do I detect a mouse down in a DataGridView that is not over a cell? Pin
Jimmanuel2-Jun-09 3:00
Jimmanuel2-Jun-09 3:00 
GeneralRe: how do I detect a mouse down in a DataGridView that is not over a cell? Pin
Dan Neely2-Jun-09 4:04
Dan Neely2-Jun-09 4:04 
Questionadding to a list Pin
maurimauri292-Jun-09 2:47
maurimauri292-Jun-09 2:47 
AnswerRe: adding to a list Pin
Le centriste2-Jun-09 2:50
Le centriste2-Jun-09 2:50 
AnswerRe: adding to a list Pin
musefan2-Jun-09 2:53
musefan2-Jun-09 2:53 

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.