473,569 Members | 2,870 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simulating a web form upload through windows based application

Hi,

I am developing a standalone or windows based application in vb.net which
simulates a website.

I would like to simulate this web form from my vb.net application:

<form action ="cgi-images/accept_upload.p l" method = POST
ENCTYPE="multip art/form-data">
<input type = text name = uname>
<input type = password name =passwd>
<input type = FILE name = file1>
<input type = FILE name = file2>
<input type = FILE name = file3>
<input type = FILE name = file4>
<input type=submit>
</form>
I need help in this regard.

I referred the following site :

http://www.codeproject.com/csharp/UploadFileEx.asp

The code in this site is not working as it simulates the following webform:

<form action ="http://localhost/test.php" method = POST>
<input type = text name = uname>
<input type = password name =passwd>
<input type = FILE name = uploadfile>
<input type=submit>
</form>

With this code , I am getting the following error:

"Cannot handle redirect from http/https protocols to other dissimilar ones"

Any kind of help is appreciable.

I need this help as early as possible.

Thank you.
Balu.


Jul 22 '05 #1
1 1963
balu wrote:
Hi,

I am developing a standalone or windows based application in vb.net
which simulates a website.

I would like to simulate this web form from my vb.net application:

<form action ="cgi-images/accept_upload.p l" method = POST
ENCTYPE="multip art/form-data"> <input type = text name = uname>
<input type = password name =passwd>
<input type = FILE name = file1>
<input type = FILE name = file2>
<input type = FILE name = file3>
<input type = FILE name = file4>
<input type=submit>
</form>
I need help in this regard.

I referred the following site :

http://www.codeproject.com/csharp/UploadFileEx.asp

The code in this site is not working as it simulates the following
webform:

<form action ="http://localhost/test.php" method = POST>
<input type = text name = uname>
<input type = password name =passwd>
<input type = FILE name = uploadfile>
<input type=submit>
</form>

With this code , I am getting the following error:

"Cannot handle redirect from http/https protocols to other dissimilar
ones"


It would be interesting to see the HTTP traffic in this case. Can you
capture the traffic using Fiddler (www.fiddlertool.com)?

Cheers,

--
http://www.joergjooss.de
mailto:ne****** **@joergjooss.d e
Jul 22 '05 #2

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

Similar topics

47
7575
by: Lauren Quantrell | last post by:
I have constructed the following code that simulates the common rollover effect when moving the mouse over a label (this example makes the label bold.) I'm wondering if anyone has come up with a better solution. lq 'start code:
2
9718
by: Daniel López | last post by:
Anyone know how can I upload a file to a PHP Web Form from a C# Windows Application ? I've tried to use WebClient.UploadFile("path_file_to_upload","url_of_php_form"); but with this I don't upload anything and don't get any error. I think that the problem should be in the php web form or in the way that I upload the file. Thanks.
9
2808
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am facing. Please please help me to solve this as soon as possible. So here we go ... I am not able to take the screen shot of the windows form...
8
12210
by: Du | last post by:
I'm trying to automate the upload process to yousendit.com, but the file size doesn't add up and yousendit.com keep rejecting my upload (it accepts the upload until the very end) I don't know what i'm missing, I use Fiddler and I got my header and body to a very close match, but the content-length is slightly off and I got no clue why ...
2
1899
by: Andy Johns | last post by:
I've seen plenty of examples of file uploads in ASP.NET when the only form element is the file input type, but I've not seen a practical example of a file upload routine running alongside other form elements, e.g. a text box for a description for example. If the form is being posted in multipart format then the text coming through will need...
6
1430
by: Timo | last post by:
The IT Manager where I'm working prizes "no touch" deployment above all else. The instructions I've been given are basically this: if it's possible in ASP.NET, write it in ASP.NET; use WinForms only as a last resort. One of the departments has specified that they need to have multiple Customer records open at the same time, in different...
0
306
by: balu | last post by:
Hi, I am developing a standalone or windows based application in vb.net which simulates a website. I would like to simulate this web form from my vb.net application: <form action ="cgi-images/accept_upload.pl" method = POST ENCTYPE="multipart/form-data"> <input type = text name = uname>
6
2858
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox and the coresponding 'Id' from the lookup table is to be inserted into the field of the new record. I have two simple tables. "tblPerson" is the...
1
2373
by: stuart | last post by:
Hi I'm trying to write a Python script to receive and save a file on a web server that has been POST'ed from a client application. In essence, this is similar to handling a file upload from an HTML form. However, I can't use: form = cgi.FieldStorage() fileitem = form
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7679
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6287
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.