473,385 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Preventing bookmarking

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.
Nov 18 '05 #1
2 1851
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.
--
Pete
-------
Read/Write .NET articles
http://www.howtodothings.com/showart...ubcategory=132
Nov 18 '05 #2
"chazmanian" <an*******@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
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.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Martin Lucas-Smith | last post by:
Can anyone provide any suggestions/URLs for best-practice approaches to preventing SQL injection? There seems to be little on the web that I can find on this. Martin Lucas-Smith ...
5
by: Bruce | last post by:
I have a number of forms that do significant work based on variables POSTed from the form. What is the common method of detecting and preventing this work from being done when the form is POSTed as...
1
by: David Hane | last post by:
Hi all, I would like give users the ability to experiment with complex queries but I'm worried about them creating queries that will bog down the server. Does anyone have any ideas for...
3
by: Boni | last post by:
Dear all, I create a big number of a class instances of some class. Sometimes this instances must be collected (all pointers are deleted, but instance is not explicitly disposed).But sometimes I...
3
by: vMike | last post by:
Is there a way to adjust the url of the bookmark value when someone wants to bookmark a page. When a user tries to bookmark a page they get the non-postback state of the page. I can use code to...
1
by: jonefer | last post by:
What is the best mechanism/ convention for preventing stacked datagrids from overlapping each other? I'd like to do something similar to a "can shrink/can grow" in an Access report for an aspx...
3
by: Grumps | last post by:
Im trying to build a bookmarking feature with ajax and everything has work until i come across the callback problem. document.getElementById during stateChanged Im trying to make possible...
0
rhitam30111985
by: rhitam30111985 | last post by:
hi there.. i am new to this network and also new to python programming.. i have been assigned the task to figure out how exactly social bookmarking is done but have no idea.. dunno where to start......
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.