Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connecting via FTP in VB.NET
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Connecting via FTP in VB.NET
Divers
Thread ID:
00797213
Message ID:
00797213
Vues:
57
Hi,

I am currently using ASP.net to connect to a site using System.Net.Sockets.TcpClient. I successfully connect to the ftp site, and login ok, and even get to the correct remote directory. But I cant seem to get to put a file on the server.
'get response
netstream = tcpC.GetStream()
thisResponse = GetResponse(netstream)

'enter user name
thisResponse = SendCommand(netstream, "User " & user & vbCrLf)

' enter password
thisResponse = SendCommand(netstream, "Pass " & pass & vbCrLf)

' go to directory
thisResponse = "Change Dir: " & SendCommand(netstream, "cwd /Public/mysite.net" & vbCrLf)

thisResponse = "Put File: " & SendCommand(netstream, "put textfile.txt" & vbCrLf)
I then send thisResponse out to a label on my ASPX page. However the last string i receive is "Put File: 250 CWD command successful." - which seems to be the response from the Change Directory command.

I sometimes get a response that says "500 Put Command not recognised"

Could anyone help with this?

Many thanks

John
Répondre
Fil
Voir

Click here to load this message in the networking platform