codice:
Dim uriString As String = "http://x69asterix.altervista.org/fisica/tutti"
Dim myWebClient As New Net.WebClient()
Console.WriteLine(ControlChars.Cr & _
"Please enter the fully qualified path of the file to be uploaded to the URL")
Dim fileName As String = "C:\Abbate.zip"
Console.WriteLine("Uploading {0} to {1} ...", fileName, uriString)
' Upload the file to the Url using the HTTP 1.0 POST.
Dim responseArray As Byte() = myWebClient.UploadFile(uriString, "POST", fileName)
' Decode and display the response.
Console.WriteLine(ControlChars.Cr + "Response Received.The contents of the file uploaded are: " & _
ControlChars.Cr & "{0}", System.Text.Encoding.ASCII.GetString(responseArray))
la risposta ottenuta è:
ma il file non è caricato.
se invece carico via ftp il problema non si pone.
ANCHE USANDO QUESTO CODICE
codice:
My.Computer.Network.UploadFile("c:\File.txt", "http://x69asterix.altervista.org/fisica/tutti")
nessun errore ma il file non è stato caricato