473,396 Members | 2,011 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,396 software developers and data experts.

Form Upload Test Utility?

Anyone know of any form upload utilities which will allow me to upload
files to an ASP.NET page without the need of a web browser?

I like to test a form upload page I wrote (no GUI, it only accepts a form
post).

Thanks!
Dec 12 '06 #1
4 1614
uh can't you script that? I mean I think that I could do it with the
ITC or something ridiculous.. but of course.. using serverXmlHttp might
be needed... I'm pretty sure.

or.. shit.. what's the name of that website?

www.winsockvb.com - oh damn it's down.. i'd go to archive.org and type
in winsockvb.com
or this has some alternatives
http://www.vbforums.com/showthread.p...61394&t=407216

I mean.. what I want.. is to build something like XML webservices.. but
based on CSV and a header file or something.. lol

how many instances you trying to run, dog?

-Aaron
Spam Catcher wrote:
Anyone know of any form upload utilities which will allow me to upload
files to an ASP.NET page without the need of a web browser?

I like to test a form upload page I wrote (no GUI, it only accepts a form
post).

Thanks!
Dec 12 '06 #2

aa*********@gmail.com $B$N%a%C%;!<%8(B:
>
or.. shit.. what's the name of that website?

www.winsockvb.com - oh damn it's down.. i'd go to archive.org and type
in winsockvb.com
or this has some alternatives
http://www.vbforums.com/showthread.p...61394&t=407216
I don't like that forum at all because thereisn't a game discuson
corner. But it looks reaaally cool.

Dec 12 '06 #3
You can use the HttpWebRequest class.

use something like this (from my memory) :

HttpWebRequest req =
(HttpWebRequest)WebRequest.CreateDefault(http://youpage);

Stream s = req.GetResquestStream();

byte[] post = Encoding.ASCII.GetBytes(string.format(
"yourpostvar={0}&yourotherpostvar={1}",
HttpUtility.UrlEncode("The value of your post variable"),
5.ToString()
);

s.Write(raw, 0, raw.Length);
s.Close();

HttpWebResponse resp = req.GetResponse();

Stream respStream = resp.GetResponseStream();

StreamReader sr = new StreamReader(respStream);

return sr.ReadToEnd();
Notice the post variables are string in ASCII encoding. If you require
passing value that are strings, you will have to deal with string
convertion. Use classic .ToString() and .Parse() methods for simple types,
and Convert.ToBase64String() and Convert.FromBase64String() to handle byte
array (which can for example a byte representation of a serialized object in
binary format, or even xml format).
The other issue I met concerned the international chars like éąē. I needed
to encode it into a byte array then passing it in base 64 form, even if the
type was in string format (but there's certainly better ways).

Hope that helps
Steve
"Spam Catcher" <sp**********@rogers.coma écrit dans le message de news:
Xn*********************************@127.0.0.1...
Anyone know of any form upload utilities which will allow me to upload
files to an ASP.NET page without the need of a web browser?

I like to test a form upload page I wrote (no GUI, it only accepts a form
post).

Thanks!

Dec 12 '06 #4
"Steve B." <st**********@com.msn_swap_msn_and_comwrote in news:u
$M*************@TK2MSFTNGP04.phx.gbl:
You can use the HttpWebRequest class.

use something like this (from my memory) :

HttpWebRequest req =
(HttpWebRequest)WebRequest.CreateDefault(http://youpage);

Stream s = req.GetResquestStream();

byte[] post = Encoding.ASCII.GetBytes(string.format(
"yourpostvar={0}&yourotherpostvar={1}",
HttpUtility.UrlEncode("The value of your post variable"),
5.ToString()
);

s.Write(raw, 0, raw.Length);
s.Close();

HttpWebResponse resp = req.GetResponse();

Stream respStream = resp.GetResponseStream();

StreamReader sr = new StreamReader(respStream);

return sr.ReadToEnd();
Thanks!

I found an easier way - I just whipped up a HTML page and made the form
post directly to my ASPX test page.

Duh - don't know why I didn't think of that in the first place :-)
Dec 12 '06 #5

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

Similar topics

3
by: Jason | last post by:
Hi folks, I'm trying to create a section of a website with a unique file upload utility. The problem is that in most code and components I find to pass multipart/form data, you need to know the...
2
by: Sean Dotson | last post by:
I have a form that passes variables to an asp file and then uploads a file. For some reason the request.form is not getting the info from the form. It's returning blanks. Any insight would be...
3
by: Jon Petrak | last post by:
I'm sorry if this is the wrong newsgroup, but the ASP ones seem to be devoid of any talk about ASP (and rather filled with spam). I have a very simple form here that loops back into upon...
0
by: Benjamin Bittner | last post by:
Hallo NG, ive searched a lot in some google groups, and found many threads, but nothing that helped me. Here is the scenario: I have an aspx page which loads a user control in page.onInit like...
7
by: Mark Waser | last post by:
Hi all, I'm trying to post multipart/form-data to a web page but seem to have run into a wall. I'm familiar with RFC 1867 and have done this before (with AOLServer and Tcl) but just can't seem...
1
by: John Wolff | last post by:
Iā€™m trying to upload a file to a Web Service. I have to submit the file using a standard HTML form with the <input type=ā€œfileā€ /tag. Ultimately, we are submitting the file from a Flash 8...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
4
by: Spam Catcher | last post by:
Anyone know of any form upload utilities which will allow me to upload files to an ASP.NET page without the need of a web browser? I like to test a form upload page I wrote (no GUI, it only...
17
by: Paul | last post by:
On my development computer, I have virtual named host set up, like www.site1.lab. When I upload those to my web site for customer review under mywebsite.com/clients/site1/ it throws some of the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
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
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...
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...

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.