Click here to Skip to main content
16,005,169 members
Home / Discussions / C#
   

C#

 
GeneralRe: pls Provide C# code for the Visual Basic code Below Pin
WillemM5-Jun-05 0:58
WillemM5-Jun-05 0:58 
GeneralRe: pls Provide C# code for the Visual Basic code Below Pin
Robert Rohde5-Jun-05 1:39
Robert Rohde5-Jun-05 1:39 
GeneralRe: pls Provide C# code for the Visual Basic code Below Pin
Michael P Butler5-Jun-05 3:44
Michael P Butler5-Jun-05 3:44 
GeneralC# Active FTP Data Transfer Pin
eddieg764-Jun-05 17:21
eddieg764-Jun-05 17:21 
GeneralRe: C# Active FTP Data Transfer Pin
WillemM5-Jun-05 0:29
WillemM5-Jun-05 0:29 
GeneralRe: C# Active FTP Data Transfer Pin
emgeed6-Jun-05 14:48
emgeed6-Jun-05 14:48 
GeneralRe: C# Active FTP Data Transfer Pin
WillemM6-Jun-05 20:38
WillemM6-Jun-05 20:38 
GeneralRe: C# Active FTP Data Transfer Pin
eddieg767-Jun-05 12:42
eddieg767-Jun-05 12:42 
Yes, I do get a 150 response once the STOR command is sent. I have no problem with the PASV command at all.

This is what I do for PASV (this works):
1. Connect to FTP server w/ Username/password
2. Send the PASV command and read the response from the server
3. I parse out the IP Address and Port sent by the server in step 2
4. Create a new socket with IP/Port and connect to it.
5. Send the STOR command
6. Send bytes to upload file on the connection created in step 4

This is what I assume I should be doing for PORT:
1. Connect to FTP server w/ Username/password
2. Retrieve local IP and generate random port #
3. Create new socket with IP/Port from step 2, Bind and Listen
4. Send the PORT command with the IP/Port generated in step 2 (I receive "200 Port command successful" from server)
This is where I'm unclear on what to do next. I'm assuming that the server will automatically connect to the port I just sent, but it doesn't seem to.
5. Send the STOR command (receive 150 response from server)
6. Upload file on connection that I'm listening on (Error occurs here).

The reason I'm trying to do it this way:
Our automated FTP program has been failing to send files to one of our clients in Passive mode. After we contacted them they asked that we try sending the files non-passive. What I find odd is that we receive a response from their server when sending the PASV command, but we can't connect to it. In fact, we can't even ping it. So, you might be right in that it could be a firewall issue on their end. Nevertheless, I was still tasked to get Active file transfers to work, but can't even do it on our local servers.Confused | :confused:

Any thoughts?

Thanks, Eddie
GeneralRe: C# Active FTP Data Transfer Pin
S. Senthil Kumar5-Jun-05 4:10
S. Senthil Kumar5-Jun-05 4:10 
GeneralRe: C# Active FTP Data Transfer Pin
eddieg766-Jun-05 16:55
eddieg766-Jun-05 16:55 
GeneralRe: C# Active FTP Data Transfer Pin
S. Senthil Kumar6-Jun-05 17:40
S. Senthil Kumar6-Jun-05 17:40 
GeneralHELP overriding windows message Pin
Sasuko4-Jun-05 15:13
Sasuko4-Jun-05 15:13 
GeneralRe: HELP overriding windows message Pin
Luis Alonso Ramos4-Jun-05 17:01
Luis Alonso Ramos4-Jun-05 17:01 
Generalcorrect way in c# to... Pin
rocky_pulley4-Jun-05 12:05
rocky_pulley4-Jun-05 12:05 
GeneralRe: correct way in c# to... Pin
Carsten Zeumer4-Jun-05 12:29
Carsten Zeumer4-Jun-05 12:29 
GeneralRe: correct way in c# to... Pin
S. Senthil Kumar5-Jun-05 4:14
S. Senthil Kumar5-Jun-05 4:14 
GeneralTabAlignment change messing up my buttons' mouse events Pin
Flack4-Jun-05 10:50
Flack4-Jun-05 10:50 
GeneralProblem with MySQL connection Pin
tantiboh4-Jun-05 10:01
tantiboh4-Jun-05 10:01 
GeneralRe: Problem with MySQL connection Pin
Dave Kreskowiak4-Jun-05 15:58
mveDave Kreskowiak4-Jun-05 15:58 
Generalcaputring a textbox Pin
Anonymous4-Jun-05 9:21
Anonymous4-Jun-05 9:21 
GeneralRe: caputring a textbox Pin
MoustafaS4-Jun-05 11:38
MoustafaS4-Jun-05 11:38 
GeneralRe: caputring a textbox Pin
eggie54-Jun-05 11:51
eggie54-Jun-05 11:51 
Generalforeign windows: position and size of minimize button Pin
FreeClimber4-Jun-05 9:18
FreeClimber4-Jun-05 9:18 
GeneralCombobox - Add Object's name property, not Object's name Pin
Seraphin4-Jun-05 7:35
Seraphin4-Jun-05 7:35 
GeneralRe: Combobox - Add Object's name property, not Object's name Pin
Carsten Zeumer4-Jun-05 7:42
Carsten Zeumer4-Jun-05 7:42 

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.