473,748 Members | 4,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1637
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*********@gma il.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.Cre ateDefault(http://youpage);

Stream s = req.GetResquest Stream();

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

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

HttpWebResponse resp = req.GetResponse ();

Stream respStream = resp.GetRespons eStream();

StreamReader sr = new StreamReader(re spStream);

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.ToBase6 4String() and Convert.FromBas e64String() 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**********@r ogers.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**********@c om.msn_swap_msn _and_comwrote in news:u
$M************* @TK2MSFTNGP04.p hx.gbl:
You can use the HttpWebRequest class.

use something like this (from my memory) :

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

Stream s = req.GetResquest Stream();

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

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

HttpWebResponse resp = req.GetResponse ();

Stream respStream = resp.GetRespons eStream();

StreamReader sr = new StreamReader(re spStream);

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
3641
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 number of files specified to upload. I'm trying to solve this by having one INPUT TYPE=FILE box, and, using javascript, each time someone selects a file, it populates one listbox below it. Once the submit button is pressed, I'm sending the...
2
2458
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 appreciated.... Here is the asp file <HTML> <HEAD> <TITLE>File Upload Results</TITLE>
3
1694
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 submission: All I'm trying to do is test that the hidden field is passing properly (it's not). It works fine when I remove the encoding property from the FORM tag, but I need it to build a file upload component. I've noticed quite a few messages on...
0
5514
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 this Dim pdControl As bb.unit = CType(LoadControl("./content/unit.ascx"), bb.unit) phContent.Controls.Add(pdControl)
7
17333
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 to get it to work in Visual Basic. I tried coding it once myself from scratch and then modified a class that I found on a newsgroup (referenced below). Both seem to be doing the same thing and neither works (or rather, they seem to work but the...
1
31532
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 application that uses Macromedia’s flash.net.FileReference class. The FileReference class behaves like a standard HTML form with the file input tag. I know there are other options for submitting files through Web Services, but we’re not able...
27
4752
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 appears that the data goes straight to the processing page, rather than the javascript seeing if data is missing and popping up an alert. I thought it may be because much of the form is populated with data from the db (lists, etc.), but when I leave...
4
970
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 accepts a form post). Thanks!
17
1694
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 source file references off and it does not work properly. My references are like: require_once($_SERVER."/utility/top.php");
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9374
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9249
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8244
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.