473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

File upload assitance requested

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)

Can anyone clue me in on what I'm doing wrong here?
Nov 17 '05 #1
4 1269

"Big Tony" <no**@somewhere.else.com> wrote in message
news:um********************************@4ax.com...
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)
Can anyone clue me in on what I'm doing wrong here?

Nov 17 '05 #2
| Is it possible to upload the file without user interaction to a form post
the form?

No, it is not. If it *would* be possible, it would be a big security flaw.

--
Michal A. Valasek, Altair Communications, http://www.altaircom.net
Please do not reply to this e-mail, for contact see http://www.rider.cz
Keeping Freedom safe from Democracy
Nov 17 '05 #3
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 ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #4
| Is it possible to upload the file without user interaction to a form post
the form?

No, it is not. If it *would* be possible, it would be a big security flaw.

--
Michal A. Valasek, Altair Communications, http://www.altaircom.net
Please do not reply to this e-mail, for contact see http://www.rider.cz
Keeping Freedom safe from Democracy
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Prakash | last post by:
Hi, We face problems uploading excel (with macros) documents using HTML File Upload. The file contents are corrupted while viewing the same. However, we are able to upload excel (w/o. macros)...
7
by: Joe | last post by:
I have an upload file operation in the web application. UploadForm.asp is the form, and UploadAction.asp is the form processing. //UploadForm.asp <FORM NAME="InputForm"...
2
by: Big Tony | last post by:
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...
4
by: Kenneth Keeley | last post by:
Hi, I have a page that uploads files to my server and I wish to display a "Please wait while uploading" page to the user while the file is uploading. I have been able to redirect the user once the...
3
by: Pitcairnia | last post by:
The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about...
8
by: mpar612 | last post by:
Hello, I am a newbie to PHP, MySQL. I am trying to create a basic file upload form. I want to get that working and then I want to integrate that into a form that will rename the file and save...
7
by: ljuljacka | last post by:
I'm just trying to run a fileupload script from the manual, just to see how it works, and it won't. I've checked if file upload is enabled and it is. Also, the file I'm trying to upload is smaller...
5
by: darrel | last post by:
I'm looking for some options for implementing a file uploading tool. The 'catch' is that it's been requested that we accomodate files from 2 to 100mb in size, and, ideally, the ability to upload up...
6
by: JimmyKoolPantz | last post by:
Task: Customer wants a script of the data that was processed in a "CSV" file. Problem: Zip-Code leading zeros are dropped Basically we have a client that has requested a custom script for...
6
by: lily86 | last post by:
i'm using vs.net 2003.... i want to let the user upload images and i want to save the image to my web server file to convenient i display the images on other pages.... but i'm having a problem when i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.