Forums

This topic is locked

Prevent user from viewing documents without login

Posted 23 Mar 2004 18:13:13
1
has voted
23 Mar 2004 18:13:13 NaiWah Lui posted:
hi

I want to prevent users from viewing documents by typing in URL directly like localhost/venture/DocFolder/some.pdf without login in.

How do can I accomplish this?

Many thanks in advance

Replies

Replied 23 Mar 2004 23:51:51
23 Mar 2004 23:51:51   replied:
The easiest way would be to put the contents in a database. And with PDF you should be able to do that.

Edited by - Lilac Crafts on 23 Mar 2004 23:52:47
Replied 24 Mar 2004 09:08:43
24 Mar 2004 09:08:43 NaiWah Lui replied:
Thanks, but can you roughly tell me what datatype should i use in SQL2000 inorder to place the PDF file into DB. How can i accomplish it because i really had no idea how i can put the whole PDF content into DB.

You mentioned PDF, can it also accept excel, powerpoint and word

Thanks
Replied 24 Mar 2004 18:53:44
24 Mar 2004 18:53:44 Jeremy Conn replied:
I would simply put the path of the documents into a DB, then use a kind of "view.asp" page that is a frame that simply pulls in the document by it's ID... that way, you are never linking directly to a document itself, so people won't be seeing the "www.mysite.com/docs/docname.pdf" in the URL - instead they'll see "www.mysite.com/view.asp?ID=5" or something like that.

This way, you can also set a permission setting for each document, and if someone doesn't have that level of access, you can simply disallow them the ability to view it - that code could either be in that "view.asp" page itself, or you could never display the link at all.

<b>Connman21</b>
www.conncreativemedia.com
<b>DEVELOPMENT SETUP</b>
DW MX Studio
Web Server: IIS5
DB: Access2000/SQL2000
OS: XP Pro
Language: ASP/VB

Reply to this topic