iNet Control replacement

  • Thread starter Thread starter Lou
  • Start date Start date
L

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
 
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.
 
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 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.
 
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)
 
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.
 
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.aspx

I feel really dumb. Oops :-S
 
Back
Top