Groups | Blog | Home
all groups > asp.net > august 2003 >

asp.net : File upload assitance requested



MS News (MS ILM)
8/9/2003 6:00:28 PM

[quoted text, click to view]

Big Tony
8/9/2003 8:39:35 PM
I'm going crazy trying to do something I think should be simple.

Task: Windows service that will post a file to a WebServer automatically.

I have created a form on the remote site. I can use IE and post to it.
When I try to use System.Net.Webclient to post to the form, it does not work.
No error is returned, but the file does not upload.


Here is the code that is used to post.
Dim Client As New WebClient
Dim UriString As String = "http://10.80.1.169/vbnetupload/webform1.aspx"
Dim filename As String = "c:\new.txt"
Dim responseArray As Byte() = Client.UploadFile(UriString, "POST", filename)

Natty Gur
8/9/2003 8:53:06 PM
Hi,

Did you try to catch Exceptions?

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button