Click here to Skip to main content
15,900,495 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In the ASP.NET MVC4 web application, how can I prevent the bookmarking on secured page. One option is we can redirect the secured bookmaked pages to login page or session expired custom page with the state management techniques.
But is there any way to prevent bookmarking itself without making any settings in the client browser?

What I have tried:

We have tried session management techniques as mentioned in the question.
Posted
Updated 27-Sep-16 23:53pm
v2
Comments
Suvendu Shekhar Giri 25-Sep-16 10:11am    
You can hide the complete toolbar using javascript but pop-blockers can block them. Is that something can be useful for you?
Vipin_Arora 25-Sep-16 11:36am    
Thanks Suvendu. Can u share the reference or code snippet.

You can't prevent a site from book marking your urls. I could always simply copy the url and save it in a text file anyway. You need to change the way you think about websites and properly deal with the fact that everything is public and you can't restrict or stop the user doing things, you can't disable browser features etc.
 
Share this answer
 
Well, if you don't want user to go to specific address, then don't use distinct address for each page.

However, you would have to implement your own code to dispatch to appropriate controller and action.

Usually, you would not care about that and simply validate that the parameters are valid for the currently logged user.

Another way to make it less likely that the user would save a bookmark would be to use an iframe and put that page in an iframe so that the sensible address is not directly shown to the user.

Obviously, this is not very secure but it might to make easy to save desired URL and harder to save undesired one.
 
Share this answer
 
C#
You can't keep a site from book denoting your urls. I could simply essentially duplicate the url and spare it in a content document at any rate. You have to change the way you consider sites and legitimately manage the way that everything is open and you can't confine or stop the client doing things, you can't cripple program highlights and so on.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900