473,385 Members | 1,622 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,385 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 959
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...
5
by: furby | last post by:
I've been browsing around the web for an answer to this and I can't find a good answer to it.... here's the problem: I am using an ASP include file called "ClsUpload.asp" to upload a text file...
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.