Solved

File upload with ASP

Posted on 1999-01-27
6
215 Views
Last Modified: 2013-12-25
Does anyone know how you do a file upload using ASP. I don't mean the HTML form, thats the easy bit. Just I can't see anywhere where the file data is returned to the ASP routine.
0
Comment
Question by:mouatts
6 Comments
 
LVL 10

Expert Comment

by:MasseyM
ID: 1832416
YOu need something that will accept the data.  Microsoft has ther Posting Acceptor or you can download FileSA(something like that) from www.activeserver.com
0
 
LVL 2

Accepted Solution

by:
wpd earned 50 total points
ID: 1832417
Your ASP page will receive the content of the file through :
Request.BinaryRead (...)

BUT... this method won't give you access to the original, binary content of the file you uploaded, which will be encoded in a SafeArray. Then you may :

1. process the SafeArray yourself to recompose the file's content.
2. get Microsoft Posting Acceptor (which is only one file, cpshost.dll) from Site Server or IIS, some (very scarce) documentation can be found on MS site.
3. get a software package from another vendor.

Solution 1. is more difficult than it may seem, requires a lot of coding & testing.
Solution 2. works ok but since it's CGI based, there are many shortcomings/potential problems with ASP, including security, (lack of) session variables, etc...
Solution 3. is cheaper, al things considered. I use FileUpload from Software Artisans, which has a very good integration with ASP.

In case you're interested, I may even have code samples for Solution 2., and the most part of the code for Solution 1. Just don't know where they are :)
0
 
LVL 11

Author Comment

by:mouatts
ID: 1832418
Thanks thats what I needed. I've had a play with the Posting Acceptor (if something so painful can be described as play) and hit across the problem that it could seem to see the login user and thus kept throwing the access error or if I used the Active X component came out with the illuminating error message of 'invalid parameter'!

I hear what you are saying about coding it myself but frankly supporting the Acceptor would be a bigger problem. So far as buying something in I hate to pay someone else when I can get someone to pay me instead :)

Thanks
Steve
0
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
LVL 10

Expert Comment

by:MasseyM
ID: 1832419
I would like your code for parts 1 and 2 if you have found them.  If you could, please email them to me at masseym@mrqcorp.com

Thanks,

Matt
0
 
LVL 2

Expert Comment

by:wpd
ID: 1832420
The thing about the Posting Acceptor is that it reposts the content of the original form into the supplied url. This means  resending the original HTTP headers, but I reckon that a few are missing :).

Also, I remember that there is a registry entry that you can define (if it does not exist) or modify : AllowAnonymous (should be under LOCAL_MACHINE\Soft\MS\Posting Acceptor or sth like it). Set it to 0 or 1.

I'll look for the code next week.
0
 

Expert Comment

by:john_19
ID: 1832421
Hi WPD,

       I would like your code for parts 1 and 2 if you have found them.  If you could, please email them to me at mshirke@hotmail.com

Thanks,

Mandar
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Automate PC's, Laptop to correct OU 4 44
IDE for Python 5 62
bulk create of subfolders in multiple parent folders 9 50
Deploy restore partition 1 23
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question