Click here to Skip to main content
16,015,756 members
Home / Discussions / C#
   

C#

 
GeneralRe: please convert this method :) Pin
Paul Lyons23-Oct-04 3:48
Paul Lyons23-Oct-04 3:48 
GeneralRe: please convert this method :) Pin
SeaMonkey00723-Oct-04 15:10
SeaMonkey00723-Oct-04 15:10 
GeneralGroup box text will not display an Ampersand Pin
Tony D. Abel22-Oct-04 13:36
Tony D. Abel22-Oct-04 13:36 
GeneralRe: Group box text will not display an Ampersand Pin
Colin Angus Mackay22-Oct-04 13:57
Colin Angus Mackay22-Oct-04 13:57 
GeneralRe: Group box text will not display an Ampersand Pin
Tony D. Abel22-Oct-04 14:03
Tony D. Abel22-Oct-04 14:03 
GeneralTabPage OnClick Pin
quilkin22-Oct-04 12:14
quilkin22-Oct-04 12:14 
GeneralRe: TabPage onclick Pin
Heath Stewart22-Oct-04 12:43
protectorHeath Stewart22-Oct-04 12:43 
GeneralActive FTP and C# Pin
mrfricke200222-Oct-04 10:28
mrfricke200222-Oct-04 10:28 
Hello all!

I'm attempting to create an active connection to an ftp server without any success. Passive mode works fine, but I have a vendor that will not allow passive mode connections. So I use the PORT command that specifies my IP and then the port number to use and this succeeds, but when I try to send the data, the connection is out right refused.

I'm using FTPClient.cs which was posted on this site (I used *'s instead of the IP address at my company)

private Socket createDataSocket()
{

this.sendCommand("PORT *,*,*,*,7,130");

if ( this.resultCode != 200 ) throw new FtpException(this.result.Substring(4));

Socket socket = null;
IPEndPoint ep = null;

try
{
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
ep = new IPEndPoint(Dns.Resolve("*.*.*.*").AddressList[0], ((7 << 8) + 130));
socket.Connect(ep);
}
catch(Exception ex)
{
// doubtfull....
if ( socket != null && socket.Connected ) socket.Close();
throw new FtpException("Can't connect to remote server", ex);
}

return socket;
}

I then use the STOR command to write the file name on the server, which it completes, but then the data connection is refused.

Any thoughts?
Generaldrawing on the main menu background Pin
jcl55522-Oct-04 9:44
jcl55522-Oct-04 9:44 
GeneralRe: how to open url and login Pin
Heath Stewart22-Oct-04 12:45
protectorHeath Stewart22-Oct-04 12:45 
GeneralSerializing an object with two events; need to store the hooked-up event handlers somehow Pin
PilsnerDk22-Oct-04 8:32
PilsnerDk22-Oct-04 8:32 
QuestionRegOpenKey and similar .... marshal/P-Invoke?? Pin
Paolo Ponzano22-Oct-04 7:56
Paolo Ponzano22-Oct-04 7:56 
AnswerRe: RegOpenKey and similar .... marshal/P-Invoke?? Pin
Nick Parker22-Oct-04 10:57
protectorNick Parker22-Oct-04 10:57 
AnswerRe: RegOpenKey and similar .... marshal/P-Invoke?? Pin
Ami Bar22-Oct-04 13:56
Ami Bar22-Oct-04 13:56 
GeneralRe: RegOpenKey and similar .... marshal/P-Invoke?? Pin
Paolo Ponzano23-Oct-04 1:35
Paolo Ponzano23-Oct-04 1:35 
GeneralRe: RegOpenKey and similar .... marshal/P-Invoke?? Pin
Ami Bar23-Oct-04 5:01
Ami Bar23-Oct-04 5:01 
Generalfind the contents of a cell in a datagrid row Pin
steve_rm22-Oct-04 6:09
steve_rm22-Oct-04 6:09 
GeneralRe: find the contents of a cell in a datagrid row Pin
Heath Stewart22-Oct-04 12:59
protectorHeath Stewart22-Oct-04 12:59 
GeneralEfficient implementation of multidimensional arrays Pin
Andrew Kuklin22-Oct-04 5:03
sussAndrew Kuklin22-Oct-04 5:03 
GeneralRe: Efficient implementation of multidimensional arrays Pin
J4amieC22-Oct-04 5:24
J4amieC22-Oct-04 5:24 
GeneralRe: Efficient implementation of multidimensional arrays Pin
Utwig26-Oct-04 0:29
Utwig26-Oct-04 0:29 
QuestionWhich is faster?? Pin
exhaulted22-Oct-04 4:46
exhaulted22-Oct-04 4:46 
AnswerRe: Which is faster?? Pin
J4amieC22-Oct-04 5:16
J4amieC22-Oct-04 5:16 
GeneralRe: Which is faster?? Pin
exhaulted22-Oct-04 5:25
exhaulted22-Oct-04 5:25 
GeneralRe: Which is faster?? Pin
Colin Angus Mackay22-Oct-04 13:59
Colin Angus Mackay22-Oct-04 13:59 

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.