Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Greetings, I am new with using PDF

Status
Not open for further replies.

OnAFan

Technical User
Joined
Mar 13, 2002
Messages
120
Location
US
Greetings,
I am new with using PDFs, and I need help. I have a website that uses asp code on an IIS 5.0 Server.
First the user logs in using my asp page.
Then they go to data entry sheet.
Then they go to a pdf download page.
Is there a way to make the pdf not accessible unless the person comes from the second page? Right now, the pdf is password protected, but that is not enough. The customer needs the users to use the sequence. As it stands, they can type in the url: and bypass all steps. Thank you in advance.
Terry
 
U can do it with out doing anything to IIS.

[Switching to programming mode]

What I would do is include all the coding for your d/l pdf page into the page just b4 it. What i mean is have it pass a flag or watever via post(not get) so ur page will know that you should execute the chunk of code that'll let the user d/l the file.

Here's the basic structure (excuse the syntax).

Request(download) <-- download is a boolean passed here by previous page.

if (download) then
Response.write(&quot;<a href=' here</a>&quot;)
else
Response.write(&quot;welcome blahblahblah click here to d/l&quot;)
end if

Hope this helps. :-)

T [afro][gorgeous][afro2]
 
lck092580 ,
Thanks for your reply. Forgive me, I dont understand how that will prevent the user from just typing and accessing it. I think what you wrote would prevent the user from seeing the link for the pdf on the download page.
I was thinking maybe use IIS to protect the folder the pdf is located in; restricting the pdf folder, to only those who come from another webpage in my site. Thanks again for your help.
-Terry
 
Hmm.. if that's the case then yeah.. use IIS and password protect the page.. but if u do that then the user would have to submit a password.. which may not be what u're looking for.

Another way to do it is have another .asp page that initiates the d/l once u enter into it. However, this wouldn't hide the path of it either.. as soon as the d/l initiates, the user will see the path. There's really not a secure way of hiding the path so password protecting it would be the only way to protect it (albeit cumbersome).

Good luck.

T
 
Thanks for your help. I am going to try putting the pdf in a db. If that doesnt work, I will use good old frames. Thanks again.
-Terry
 
Sorry I couldn't offer a better solution.

T :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top