Preventing bookmarking

G

Guest

We have some link buttons that allow the user to "view" a PDF file. That is, the link runs server-side code that generates the virtual path to the PDF file in question and then does a Response.Redirect to the file

The problem is, when the file is opened via a combination of IE and Adobe Acrobat, there is nothing to prevent the user from bookmarking that link and returning to it later without logging in to the site appropriately

Is there some way to "munge" the virtual path and file so that the bookmark, if created, is invalid

Or, better still, is there some way to prevent that bookmark from ever taking place at all

Thanks.
 
P

Peter Morris [Droopy eyes software]

Don't give them access to the file, have a script return the file as its
output instead. That way you can check access in the script.
 
J

John Saunders

chazmanian said:
We have some link buttons that allow the user to "view" a PDF file. That
is, the link runs server-side code that generates the virtual path to the
PDF file in question and then does a Response.Redirect to the file.
The problem is, when the file is opened via a combination of IE and Adobe
Acrobat, there is nothing to prevent the user from bookmarking that link and
returning to it later without logging in to the site appropriately.
Is there some way to "munge" the virtual path and file so that the
bookmark, if created, is invalid?
Or, better still, is there some way to prevent that bookmark from ever
taking place at all?

You can't prevent bookmarking any more than you could prevent the user from
writing down the URL and typing it into the browser later. What you can do
is either to generate the .pdf file as the output of the page (as another
poster suggested), or you can change the script mappings in IIS so that .PDF
files pass through ASP.NET. That way, whatever authorization you use for
..aspx files will also work for your .pdf files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top