Salve a tutti! Come da titolo, avrei un piccolo problema con un "downloader"... La classe creata dovrebbe aggiornare la mia applicazione, nel caso in cui venissero rilevati aggiornamenti disponibili. Il codice non genera alcuna eccezione, il problema è che non scarica alcun file. Posto il codice:

codice:
Public Class UpdateF
    WithEvents x As New System.Net.WebClient
'Scarico il file automaticamente, all'avvio del form.
    Private Sub UpdateF_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim path As String = "C:\Users\" & Environment.UserName & "Desktop\"
        Dim dpath As New Uri("http://phoenixstyle.altervista.org/Xat/Update/Alldebrid.exe")
        Try
            MkDir(path & "Alldebrid AC")
        Catch ex As Exception

        End Try
        Dim apath As String = path & "Alldebrid AC"
        Try
            x.DownloadFileAsync(dpath, apath & "\Alldebrid AC.exe") 'Scarico il file asincronamente
        Catch ex As Exception '*Nota 1*
            Dim x As Boolean
            If My.Computer.Network.IsAvailable = False Then
                MsgBox("Error downloading the update: no network connection found, you need an available network connection to update the application.", MsgBoxStyle.Critical, "Error")
                x = True
            End If
            If x = True Then
                Main.Close()
            Else
                MsgBox("Error downloading the update: the file or the server is temporanely unavailable, try again later.", MsgBoxStyle.Critical, "Error")
            End If
        End Try

    End Sub

'Restituisco lo stato del download con una progressbar (pgBar)
    Sub Progress(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles x.DownloadProgressChanged
        pgBar.Value = e.ProgressPercentage
        If pgBar.Value = 100 Then
            MsgBox("Update completed successfully! The new application will be located in your desktop.", MsgBoxStyle.Information, "Success")
            System.IO.File.Create(Environment.CurrentDirectory & "\update.bat") 'Creo batch che elimina l'applicazione corrente
            Dim a As System.IO.StreamWriter
            a.Write(Environment.CurrentDirectory & "\update.bat", "del " & Environment.CurrentDirectory & "\" & Me.Name)
            a.Close()
        End If
    End Sub

End Class
*Nota 1: Dovesse esserci un aggiornamento, l'applicazione non sarebbe più in grado di funzionare se quest'ultimo non venisse eseguito... quindi, nel caso in cui dovessero verificarsi errori nell'aggiornamento causa server offline o file non disponibile, l'applicazione continuerà a funzionare ma in modalità "ristretta". Tutto questo per dire alla fin fine che i codici che seguono sono stati scritti al fine di evitare eventuali tentativi 'di elusione dell'aggiornamento.

Grazie anticipatamente per eventuali risposte