Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim file As String = "c:\film.txt"
Dim DestFTP As String = "https://webdisk.magix-online.com/felice/" & file
Dim User As String = "fumomolto@teletu.it"
Dim Pwd As String = "**************"
Dim NomeFile As String = file
' My.Computer.Network.UploadFile(NomeFile, DestFTP, User, Pwd, True, 100000)
' My.Computer.Network.UploadFile("C:\film.txt", New Uri("https://webdisk.magix-online.com/FELICE"), "fumomolto@teletu.it", "**************", True, 500)
My.Computer.Network.UploadFile("C:\film.txt", "https://webdisk.magix-online.com/felice", "fumomolto@teletu.it", "**************", True, 500)
Catch ex As WebException
MessageBox.Show("Errore durante il carico del file sul web. " & ControlChars.CrLf & _
ex.Message)
If ex.Status = WebExceptionStatus.ProtocolError Then
MessageBox.Show("Codice d'errore : " & CType(ex.Response, HttpWebResponse).StatusCode)
MessageBox.Show("Descrizione errore : " & CType(ex.Response, HttpWebResponse).StatusDescription)
End If
End Try
End Sub