• (2 Pages)
  • +
  • 1
  • 2

Create an FTP Class Library in C#

#16 Guest_Brian*


Reputation:

Posted 08 March 2010 - 11:55 PM

sorry about that. The line i meant to put there was:


bytes = ftpSocket.Receive(buffer,buffer.Length, 0);
Was This Post Helpful? 0

#17 skybomb0  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 92
  • Joined: 12-May 10

Posted 27 June 2010 - 04:26 PM

What's the difference between using these raw FTP commands and using the built in FTP methods?
Was This Post Helpful? 0
  • +
  • -

#18 Guest_FTP*


Reputation:

Posted 16 July 2010 - 11:42 AM

if (_statusCode != 125 && _statusCode != 150)
077
{
078
throw new FtpException(result.Substring(4));
079
}

I am getting the error when uploading the files.


please help me..

thanks in advance
Was This Post Helpful? 0

#19 Guest_FTP*


Reputation:

Posted 16 July 2010 - 11:44 AM

getting the error Access is denied \r
Was This Post Helpful? 0

#20 jpascher  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-July 10

Posted 24 July 2010 - 11:47 AM

Looks like i could use the posted code with some adaption to do the following commands:

open 192.168.2.1
user adam2 adam2
debug
binary
quote SETENV firmware_version avme
quote MEDIA FLSH
put kernel.image mtd1

Is the still not a less complicated way to accomplish the same?

Johann
Was This Post Helpful? 0
  • +
  • -

#21 Guest_nando*


Reputation:

Posted 25 August 2010 - 08:55 AM

Hi.

I cannot make work LIST or NLST command; the call hangs, until timeout.
Anyone else got same problem?

Thank you for this great piece of code.
Nando
Was This Post Helpful? 0

#22 Guest_Benedict*


Reputation:

Posted 03 November 2010 - 03:36 AM

View PostBrian, on 08 March 2010 - 10:53 PM, said:

Does anyone know why my program would be getting stuck at




in the parseHostResponse method after uploading a big file? I watched the FTP server and its saying "226 File received OK" but the code doesn't seem to be receiving it. Also oddly enough it seems to only happen on windows 2000. I've been racking my brain for about a week now and can't figure it out. Any ideas?
Thanks


 (000015)2010/11/03 12:30:09 PM - (not logged in) (127.0.0.1)> Connected, sending welcome message...
(000015)2010/11/03 12:30:09 PM - (not logged in) (127.0.0.1)> 220-FileZilla Server version 0.9.36 beta
(000015)2010/11/03 12:30:09 PM - (not logged in) (127.0.0.1)> 220-written by Tim Kosse (Tim.Kosse@gmx.de)
(000015)2010/11/03 12:30:09 PM - (not logged in) (127.0.0.1)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000015)2010/11/03 12:32:10 PM - (not logged in) (127.0.0.1)> 421 Connection timed out.
(000015)2010/11/03 12:32:10 PM - (not logged in) (127.0.0.1)> disconnected. 


I get an error when trying to login it says the index was out of range on the

  'split the host response
            Dim msg As String() = statusMessage.Split(Environment.NewLine)
            'check the length of the response
            If statusMessage.Length > 2 Then
                statusMessage = msg(msg.Length - 2)
            Else
                statusMessage = msg(0)
            End If



trying to use the class in vb.net any ideas
Was This Post Helpful? 0

#23 nuttynuts  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-July 11

Posted 20 July 2011 - 03:01 AM

View PostPsychoCoder, on 10 September 2009 - 08:35 AM, said:

@bsjia8241: That method is in the download. Here's the code for it

/// <summary>
/// method to release and remove any sockets left open
/// </summary>
private void LogOut()
{
	//check to see if the sock is non existant
	if (ftpSocket != null)
	{
		//since its not we need to
		//close it and dispose of it
		ftpSocket.Close();
		ftpSocket = null;
	}
	//log the user out
	_isLoggedIn = false;
}



Also getting error 502 when I tried to download a file from the server
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2