By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,521 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,521 IT Pros & Developers. It's quick & easy.

iNet Control replacement

P: n/a
Lou
What is the .NET equivelent of the iNet control
I tried FtpWebRequest but that doesn't do it.
All I want to do is give an ipaddress, user name and password, send a CD
command and a DIR command
to get back a lists of files and then download one of those files.
The ip is a local ip NOT on the web.
Any examples would be helpful.

-Louie
Oct 8 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
"Lou" <lo********@comcast.netwrote in news:OxfoMpcCIHA.4308
@TK2MSFTNGP06.phx.gbl:
What is the .NET equivelent of the iNet control
I tried FtpWebRequest but that doesn't do it.
All I want to do is give an ipaddress, user name and password, send a CD
command and a DIR command
to get back a lists of files and then download one of those files.
The ip is a local ip NOT on the web.
Any examples would be helpful.
There is no FTP control in .NET.
Oct 9 '07 #2

P: n/a
Lou
So your telling me you can't do FTP in .NET!
I am going out on a ledge here and guessing you are wrong...
"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0. 1...
"Lou" <lo********@comcast.netwrote in news:OxfoMpcCIHA.4308
@TK2MSFTNGP06.phx.gbl:
>What is the .NET equivelent of the iNet control
I tried FtpWebRequest but that doesn't do it.
All I want to do is give an ipaddress, user name and password, send a CD
command and a DIR command
to get back a lists of files and then download one of those files.
The ip is a local ip NOT on the web.
Any examples would be helpful.

There is no FTP control in .NET.

Oct 9 '07 #3

P: n/a
" There is no FTP control in .NET. " does not mean you cant do it. it means
there isnt a control to do it for you. you have to use the Socket class to
send the raw FTP commands to the server. there is no class or object to do it
for you, you have to code it yourself.

--
-iwdu15
Oct 9 '07 #4

P: n/a
"Lou" <lo********@comcast.netwrote in
news:#H**************@TK2MSFTNGP06.phx.gbl:
So your telling me you can't do FTP in .NET!
I am going out on a ledge here and guessing you are wrong...
There's no native FTP control in the .NET Framework.

You must:

1. Write your own FTP client using the Socket classes
2. Download a 3rd party FTP library (Indy Socket Library, etc.)
3. Use your old VB6 COM component (not recommended, but definately doable)
Oct 9 '07 #5

P: n/a
On Oct 8, 10:43 am, "Lou" <lou.gar...@comcast.netwrote:
What is the .NET equivelent of the iNet control
I tried FtpWebRequest but that doesn't do it.
All I want to do is give an ipaddress, user name and password, send a CD
command and a DIR command
to get back a lists of files and then download one of those files.
The ip is a local ip NOT on the web.
Any examples would be helpful.

-Louie
Lou... I have never used FtpWebRequest before, but have you tried
something like:

Dim builder As New UriBuilder("ftp://192.168.15.1")
builder.UserName = "blah"
builder.Password = "blah"

Dim ftpRequest As FtpWebRequest =
DirectCast(WebRequest.Create(builder.Uri), FtpWebRequest)

To connect? Just curious.

--
Tom Shelton

Oct 9 '07 #6

P: n/a
Spam Catcher <sp**********@rogers.comwrote in
news:Xn**********************************@127.0.0. 1:
"Lou" <lo********@comcast.netwrote in
news:#H**************@TK2MSFTNGP06.phx.gbl:
>So your telling me you can't do FTP in .NET!
I am going out on a ledge here and guessing you are wrong...

There's no native FTP control in the .NET Framework.

You must:

1. Write your own FTP client using the Socket classes
2. Download a 3rd party FTP library (Indy Socket Library, etc.)
3. Use your old VB6 COM component (not recommended, but definately
doable)
Oops... I'm totally wrong!!! I didn't realize FTPWebRequest was a .NET
class.

You should be able to list the directory using the ListDirectory function:

http://msdn2.microsoft.com/en-
us/library/system.net.webrequestmethods.ftp.listdirectory.asp x

I feel really dumb. Oops :-S
Oct 9 '07 #7

P: n/a
Lou
Have not tried it but certainly will. Thanks for the snippet.

-Lou

"Tom Shelton" <to*********@comcast.netwrote in message
news:11**********************@19g2000hsx.googlegro ups.com...
On Oct 8, 10:43 am, "Lou" <lou.gar...@comcast.netwrote:
>What is the .NET equivelent of the iNet control
I tried FtpWebRequest but that doesn't do it.
All I want to do is give an ipaddress, user name and password, send a CD
command and a DIR command
to get back a lists of files and then download one of those files.
The ip is a local ip NOT on the web.
Any examples would be helpful.

-Louie

Lou... I have never used FtpWebRequest before, but have you tried
something like:

Dim builder As New UriBuilder("ftp://192.168.15.1")
builder.UserName = "blah"
builder.Password = "blah"

Dim ftpRequest As FtpWebRequest =
DirectCast(WebRequest.Create(builder.Uri), FtpWebRequest)

To connect? Just curious.

--
Tom Shelton

Oct 10 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.