Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Form Upload Test Utility?

Reply
Thread Tools

Form Upload Test Utility?

 
 
Spam Catcher
Guest
Posts: n/a
 
      12-12-2006
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!
 
Reply With Quote
 
 
 
 
aaron.kempf@gmail.com
Guest
Posts: n/a
 
      12-12-2006
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.. ****.. 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!


 
Reply With Quote
 
 
 
 
Emily B. Dickinson
Guest
Posts: n/a
 
      12-12-2006

$B$N%a%C%;!<%8(B:

>
> or.. ****.. 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.

 
Reply With Quote
 
Steve B.
Guest
Posts: n/a
 
      12-12-2006
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" <> a écrit dans le message de news:
Xns989712D077E2usenethoneypotrogers@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!



 
Reply With Quote
 
Spam Catcher
Guest
Posts: n/a
 
      12-12-2006
"Steve B." <_swap_msn_and_com> wrote in news:u
$:

> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML File Upload using enctype=multipart/form-data in form? Matt Java 8 05-26-2012 07:40 AM
File upload from client application (non-form based upload) stuart@microsoft.com Python 1 11-25-2006 12:14 AM
HTML File Upload using enctype=multipart/form-data in form? Matt HTML 1 10-12-2004 08:17 PM
TEST TEST TEST Gazwad Computer Support 2 09-05-2003 07:32 PM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57