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? 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?
| 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
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!
| 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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)...
|
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"...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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...
|
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,...
|
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...
| |