Frage ( Uri Format )

02/16/2015 13:12 zKMaxxu#1
Guten Tach ,

Mein Problem ist , das ich eine Datei aus einem Ordner ersetzen möchte , aber es nicht klappt ( bei einem Bild hats geklappt , doch nun kommt eine fehlermeldung ) . Ich möchte also per Button Klick , das die datei automatisch in dem Pfad durch die hochgeladene ersetzt wird .

Code:
 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim wc As New Net.WebClient
        wc.DownloadFileAsync(New Uri("www.datei.de/download=datei.dat"), "C:\Ordner1\Ordner2" & "\datei.dat")
    End Sub
Der Fehler ist :
Ein Ausnahmefehler des Typs "System.UriFormatException" ist in System.dll aufgetreten.

Zusätzliche Informationen: Ungültiger URI: Das URI-Format konnte nicht bestimmt werde

Danke
02/16/2015 16:37 Ludder231#2
Versuchs mal ohne das "New Uri"
02/16/2015 16:47 tolio#3
http://
02/16/2015 21:08 zKMaxxu#4
Quote:
Originally Posted by tolio View Post
http://
Ach du meine Güte ... Danke Dir :D
Manchmal kommt man einfach nicht drauf :/