Solved

File upload with ASP

Posted on 1999-01-27
6
198 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

3 Use Cases for Connected Systems

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

Question has a verified solution.

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

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
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 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 …
The viewer will learn how to dynamically set the form action using jQuery.

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now