473,394 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

StandardOutput ftp.exe

Hi there,

I run a process that run ftp.exe -s [Ftp script file]

i get the StandardOutput this way :
ftpProgram = Process.Start(ftpProgram.StartInfo)
Output = ftpProgram.StandardOutput.ReadToEnd
ftpProgram.WaitForExit()

From my computer i get the output ok :
ftp> Connected to MyServer.
open MyServer
220-QTCP at MyServer.
220 Connection will close if idle more than 5 minutes.
User (MyServer:(none)):
331 Enter password.
230 MyUser logged on.
put "C:\Program Files\MyFile.txt "
200 PORT subcommand request successful.
250 File transfer completed successfully.
But when i run my application from another computer the output looks like that :
User (S7832273:(none)): open S7832273

put "C:\Program Files\MYFile.txt"
I don't get any server response when i run application from another workstation.
Note that i use the same ftp.exe file

Is this a windows setting ?
Anyone can help me ?

Thanks
Nov 20 '05 #1
4 3597
* er*********@hotmail.com (Eric ST) scripsit:
I run a process that run ftp.exe -s [Ftp script file]

i get the StandardOutput this way :
ftpProgram = Process.Start(ftpProgram.StartInfo)
Output = ftpProgram.StandardOutput.ReadToEnd
ftpProgram.WaitForExit()

From my computer i get the output ok :
ftp> Connected to MyServer.
open MyServer
220-QTCP at MyServer.
220 Connection will close if idle more than 5 minutes.
User (MyServer:(none)):
331 Enter password.
230 MyUser logged on.
put "C:\Program Files\MyFile.txt "
200 PORT subcommand request successful.
250 File transfer completed successfully.
But when i run my application from another computer the output looks like that :
User (S7832273:(none)): open S7832273

put "C:\Program Files\MYFile.txt"
I don't get any server response when i run application from another workstation.
Note that i use the same ftp.exe file


The problem is not related to VB.NET. Open the console and type "ftp --help".

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
If i run the script at the DOS command prompt i can see the FTP server response.

But i can't see it through the StandardOutput.
It's not a ftp.exe missing parameter.

Any idea ?

er*********@hotmail.com (Eric ST) wrote in message news:<38**************************@posting.google. com>...
Hi there,

I run a process that run ftp.exe -s [Ftp script file]

i get the StandardOutput this way :
ftpProgram = Process.Start(ftpProgram.StartInfo)
Output = ftpProgram.StandardOutput.ReadToEnd
ftpProgram.WaitForExit()

From my computer i get the output ok :
ftp> Connected to MyServer.
open MyServer
220-QTCP at MyServer.
220 Connection will close if idle more than 5 minutes.
User (MyServer:(none)):
331 Enter password.
230 MyUser logged on.
put "C:\Program Files\MyFile.txt "
200 PORT subcommand request successful.
250 File transfer completed successfully.
But when i run my application from another computer the output looks like that :
User (S7832273:(none)): open S7832273

put "C:\Program Files\MYFile.txt"
I don't get any server response when i run application from another workstation.
Note that i use the same ftp.exe file

Is this a windows setting ?
Anyone can help me ?

Thanks

Nov 20 '05 #3
If i set UseShellExecute to True, i can see Output OK (FTP response are shown)
but if i read it through the StandardOutput no ftp response are in the stream...

er*********@hotmail.com (Eric ST) wrote in message news:<38**************************@posting.google. com>...
If i run the script at the DOS command prompt i can see the FTP server response.

But i can't see it through the StandardOutput.
It's not a ftp.exe missing parameter.

Any idea ?

er*********@hotmail.com (Eric ST) wrote in message news:<38**************************@posting.google. com>...
Hi there,

I run a process that run ftp.exe -s [Ftp script file]

i get the StandardOutput this way :
ftpProgram = Process.Start(ftpProgram.StartInfo)
Output = ftpProgram.StandardOutput.ReadToEnd
ftpProgram.WaitForExit()

From my computer i get the output ok :
ftp> Connected to MyServer.
open MyServer
220-QTCP at MyServer.
220 Connection will close if idle more than 5 minutes.
User (MyServer:(none)):
331 Enter password.
230 MyUser logged on.
put "C:\Program Files\MyFile.txt "
200 PORT subcommand request successful.
250 File transfer completed successfully.
But when i run my application from another computer the output looks like that :
User (S7832273:(none)): open S7832273

put "C:\Program Files\MYFile.txt"
I don't get any server response when i run application from another workstation.
Note that i use the same ftp.exe file

Is this a windows setting ?
Anyone can help me ?

Thanks

Nov 20 '05 #4
In article <38**************************@posting.google.com >, Eric ST wrote:
If i set UseShellExecute to True, i can see Output OK (FTP response are shown)
but if i read it through the StandardOutput no ftp response are in the stream...

er*********@hotmail.com (Eric ST) wrote in message news:<38**************************@posting.google. com>...
If i run the script at the DOS command prompt i can see the FTP server response.

But i can't see it through the StandardOutput.
It's not a ftp.exe missing parameter.

Any idea ?

er*********@hotmail.com (Eric ST) wrote in message news:<38**************************@posting.google. com>...
> Hi there,
>
> I run a process that run ftp.exe -s [Ftp script file]
>
> i get the StandardOutput this way :
> ftpProgram = Process.Start(ftpProgram.StartInfo)
> Output = ftpProgram.StandardOutput.ReadToEnd
> ftpProgram.WaitForExit()
>
> From my computer i get the output ok :
> ftp> Connected to MyServer.
> open MyServer
> 220-QTCP at MyServer.
> 220 Connection will close if idle more than 5 minutes.
> User (MyServer:(none)):
> 331 Enter password.
> 230 MyUser logged on.
> put "C:\Program Files\MyFile.txt "
> 200 PORT subcommand request successful.
> 250 File transfer completed successfully.
>
>
> But when i run my application from another computer the output looks like that :
> User (S7832273:(none)): open S7832273
>
>
>
> put "C:\Program Files\MYFile.txt"
>
>
> I don't get any server response when i run application from another workstation.
> Note that i use the same ftp.exe file
>
> Is this a windows setting ?
> Anyone can help me ?
>
> Thanks


I might have missed the original... But are you setting use
shellexecute to false? You can't redirect output unless it is set to
false.
--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Lewin | last post by:
I've recently discovered the value of using existing console applications in managed .net apps. Unfortunately, I've stumbled into a problem with a particular console application that check's crc...
4
by: Yash | last post by:
In a VB .NET program, I am trying to read the standard output of an FTP program. I am using a Process object and reading from its StandardOutput property. After doing a StandardOutput.ReadLine(),...
2
by: mwazir | last post by:
Hi all, I have reposted this question from dotnet.general as I have been advised that this is a more appropriate forum for this question. Apologies for the repost. I have a process thats...
3
by: Al Cohen | last post by:
I'll start by warning that I'm a newbie to C# (but I've been programming for 25 years), so I may just be doing something reallyreally dumb. I'm writing a C# wrapper for a command-line application...
15
by: Matt Burland | last post by:
I'm having a problem with redirecting the StandardOutput of a process that I use to run a DOS program in my application. The problem is that I when I start my process (which I do in a separate...
1
by: JC | last post by:
I'm trying to create a GUI wrapper for dumpbin, and so I'm using the Process class to run the command-line application. The problem is that if I use Readline() to get the output from the...
4
by: Steve | last post by:
I am using Diagnostics.Process to, well.. execute a process. I would like to display the output of the process to my UI as it is created. For example, ping www.yahoo.com will slowly output each...
0
by: BasicQ | last post by:
I am running an executable from my aspx page with the click of a button. A date is passed as an argument. I am able to get the standardoutput from the Process(Exe) into the label of my page after...
2
by: mwazir | last post by:
Hi all, I have a process thats starts in my application and only terminates when my application is terminated. I want to write the output and the errors of this process to a seperate log file....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.