VB Send File to Localhost

05/23/2015 22:12 Waller66#1
Hallo ich wollte fragen ob es möglich ist über visual basic eine datei an den localhost zu schicken, ich erhalte über den webclient mit der methodik keine antwort :


Code:
With New Net.WebClient

Try
Dim b() As Byte = .UploadFile("127.0.0.1", "test.gif")
Dim Solution As String = System.Text.Encoding.ASCII.GetString(b) ' kann hier der fehler liegen warum ich keine antwort erhalte ?
MsgBox(Solution)
Catch ex As Exception

Dim Solution As String = "Could not retrieve response; " & ex.Message
MsgBox(Solution)
Exit Try
End Try

End With
Der funktionierde html code dafür sieht wie folgt aus :

HTML Code:
<form
method="post"
action="http://127.0.0.1/"
enctype="multipart/form-data">
<input type="file" name="pict">
&nbsp;Name:&nbsp;(optional)&nbsp;<input type="text" name="test">
<input type="submit" value="Send">
</form>
Ich bedanke mich schon mal im vorraus für eure anteilnahme :)

wenn ihr auch keine lösung wisst aber euch mit php / html auskennt würde ich mich freuen wenn ihr mir zeigt wie ich es um formen muss damit ich ansonsten nur noch das html dokument aufrufen muss