Click here to Skip to main content
15,904,497 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help with c sharp and powershell exchange commands Pin
jschell16-Jun-11 12:07
jschell16-Jun-11 12:07 
GeneralRe: Help with c sharp and powershell exchange commands Pin
turbosupramk316-Jun-11 13:20
turbosupramk316-Jun-11 13:20 
AnswerRe: Help with c sharp and powershell exchange commands Pin
turbosupramk317-Jun-11 7:51
turbosupramk317-Jun-11 7:51 
GeneralRe: Help with c sharp and powershell exchange commands Pin
jschell17-Jun-11 11:40
jschell17-Jun-11 11:40 
GeneralRe: Help with c sharp and powershell exchange commands Pin
turbosupramk317-Jun-11 13:01
turbosupramk317-Jun-11 13:01 
QuestionVoIP with C# on a 64Bit Windows 7 Pin
DJ-Boris16-Jun-11 9:44
DJ-Boris16-Jun-11 9:44 
AnswerRe: VoIP with C# on a 64Bit Windows 7 Pin
BobJanova17-Jun-11 0:21
BobJanova17-Jun-11 0:21 
QuestionFTP Problem Pin
Kevin Marois16-Jun-11 9:07
professionalKevin Marois16-Jun-11 9:07 
I have this FTP code. I'm trying to get a list of files from the server. All it returns is an entry for the root folder.. Using FileZilla and/or CuteFTP I can see the subfolders and files in them. Why isnt't my returning anything other than the root folder?

public struct FTPCredentials
{
    public string FTPServer { get; set; }
    public string UserName { get; set; }
    public string Password { get; set; }
}

public List<string> GetFileList(FTPCredentials Credentials)
{
    List<string> retVal = new List<string>();

    FtpWebRequest request = (FtpWebRequest)WebRequest.Create(Credentials.FTPServer);
    request.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
    request.KeepAlive = true;
    request.UsePassive = false;

    try
    {
        request.Credentials = new NetworkCredential(Credentials.UserName, Credentials.Password);

        FtpWebResponse response = (FtpWebResponse)request.GetResponse();

        Stream stream = response.GetResponseStream();

        StreamReader reader = new StreamReader(stream);
        string line = reader.ReadLine(); 
                
        while (!string.IsNullOrEmpty(line)) 
        {
            retVal.Add(line);
            line = reader.ReadLine(); 
        }

        reader.Close(); 
        response.Close();
    }
    catch (Exception e)
    {
        throw e;
    }

    return retVal;
}

Everything makes sense in someone's mind

AnswerRe: FTP Problem [modified] Pin
Matt Meyer16-Jun-11 10:22
Matt Meyer16-Jun-11 10:22 
GeneralRe: FTP Problem Pin
Kevin Marois16-Jun-11 12:15
professionalKevin Marois16-Jun-11 12:15 
GeneralRe: FTP Problem Pin
Matt Meyer16-Jun-11 13:10
Matt Meyer16-Jun-11 13:10 
GeneralRe: FTP Problem Pin
Kevin Marois16-Jun-11 13:20
professionalKevin Marois16-Jun-11 13:20 
QuestionReverse (2-way) synchronization: DataGridView to Table (Database) Pin
Paladin200016-Jun-11 3:49
Paladin200016-Jun-11 3:49 
GeneralRe: Reverse (2-way) synchronization: DataGridView to Table (Database) Pin
Paladin200016-Jun-11 5:09
Paladin200016-Jun-11 5:09 
Questionhelp optimize functions Pin
Abbath134916-Jun-11 1:33
Abbath134916-Jun-11 1:33 
GeneralRe: help optimize functions Pin
Paladin200016-Jun-11 3:18
Paladin200016-Jun-11 3:18 
GeneralRe: help optimize functions Pin
Abbath134916-Jun-11 3:30
Abbath134916-Jun-11 3:30 
GeneralRe: help optimize functions Pin
Paladin200016-Jun-11 3:54
Paladin200016-Jun-11 3:54 
GeneralRe: help optimize functions Pin
V.16-Jun-11 3:55
professionalV.16-Jun-11 3:55 
GeneralRe: help optimize functions Pin
Paladin200016-Jun-11 4:12
Paladin200016-Jun-11 4:12 
GeneralRe: help optimize functions Pin
Abbath134916-Jun-11 4:48
Abbath134916-Jun-11 4:48 
AnswerRe: help optimize functions Pin
V.16-Jun-11 3:55
professionalV.16-Jun-11 3:55 
GeneralRe: help optimize functions Pin
BobJanova16-Jun-11 4:12
BobJanova16-Jun-11 4:12 
GeneralRe: help optimize functions Pin
V.16-Jun-11 5:43
professionalV.16-Jun-11 5:43 
GeneralRe: help optimize functions Pin
Not Active16-Jun-11 10:17
mentorNot Active16-Jun-11 10:17 

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.