Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.4k views
in .NET FTP by (180 points)
I just purchased edtftpPro and am having some difficulty getting to work.
I have the following code line and it will not compile. Intellisense says "Reference to a non-shared member requires an object reference

FTPConnection.UserName = "Username"

I have the following import statements:
Imports EnterpriseDT.Util.Socks
Imports EnterpriseDT.Net.Ftp

I also have a reference to edtFTYnetPro.

Any help would be greatly appreciated.
Dan

1 Answer

0 votes
by (162k points)
You'll need to create a new instance of FTPConnection, assign it to a variable, myFtpConnection, and then set the properties on that variable.

Dim myFtpConnection As New FTPConnection
myFtpConnection.ServerAddress = "ftp.myserver.com"
myFtpConnection.ServerPort = serverPort
myFtpConnection.UserName = "username"
myFtpConnection.Password = "userpwd"

Categories

...