Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 21st, 2004, 01:57 AM
Authorized User
 
Join Date: Nov 2003
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eapsokha
Default Authorization of download

Does anyone know how to, suppose a user wants to download a ZIP file by clicking on a ZIP-directed link (for example, www.xx.com/a.zip". So, I want to check whether that user has registered or not yet. If not yet, I will direct to a register page. How can I do that?

Many thanks

__________________
Mr. Sokha Eap
Webmaster
UNDP Cambodia
 
Old February 22nd, 2004, 10:58 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The only way to directly affect the accessibility of a non-script page on a web site would be to activate directory security, but incorporating directory security with a online registration would be difficult not to mention a bit unsecure.

You could create an ASP page that handles the checking (based on whatever method you choose) and then replies with the binary stream of the file you want to download. But you can't have a direct link to that file that checks for your registration status.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old February 23rd, 2004, 02:48 AM
Authorized User
 
Join Date: Nov 2003
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eapsokha
Default

could you please give me more detail?

Thanks
 
Old February 23rd, 2004, 12:35 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

More detail on what? Setting up directory permissions or streaming binary data?

For the binary streaming part, you need to open up the file in question with the filesystem object(s) and then use Response.BinaryWrite to write out the binary bytes of the file you want to download. I haven't done that in a long time so I can't really give you much more than that. Look for some tutorials relating to this or maybe ones relating to saving and serving up images from a database. The theory for getting the data to the browser is the same, but you have to read the data from a file instead of a database field.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
authorization denied COM+ pevl Pro VB Databases 2 July 8th, 2006 09:02 PM
Regarding authorization harshaghanta ASP.NET 2.0 Professional 1 June 5th, 2006 09:18 PM
SMTP Authorization zarol Pro PHP 1 April 9th, 2006 12:59 PM
Authorization @shish ASP.NET 1.0 and 1.1 Basics 0 March 7th, 2006 06:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.