Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello ,

i have a website in which i will have free/paid users so i want only paid users to access uploaded videos so problem here is that to display uploaded video how can i achieve security so that only paid user can access those video . and i want to display video on pop up well that is not an issue i m able to display video on popup but the problem is that video link is visible inside inspect element through which anyone can access that video so i want to protect that video from an unauthenticate users .

Thnx in advance.
Posted
Comments
ChienVH 9-Jun-13 10:22am    
When someone clicking to your video link, firstly you need to check user's permissions. If this user is paid user, then redirecting/opening the video. Else, redirecting or show a message to as their don't have permission to view this content...
satish hirpara 13-Jun-13 3:01am    
thnks :)
satish hirpara 18-Jun-13 2:09am    
Hey thnk you but what if a Paid user gives link to his/her friend then in this case any one can access that video you got the point what i m saying . suppose u r the paid user and i m your friend then u have the access of all paid videos so if you give me that links then in this case i also can access those videos so how to prevent this . plz reply
ChienVH 18-Jun-13 14:03pm    
Pls see my reply in Solution 1
Ahmed Bensaid 10-Jun-13 6:15am    
You have to check the user's permissions, and if he's paid user, you generate the video link.
If he's a free user, you don't generate the video link (so the link is not present in the html code). If you want more help, show us a little piece of code ;)

1 solution

Yep, I got the trouble you're facing. I will try my best to explain detail to you by an example:

- I assume you have a page like VideoList.aspx, which contains a list of video (includes free & paid video)
- I also assume you already created a table, which contains user's info with ROLES (maybe: 1- paid user. 0- free user)

So, we will have cases:

Case 1: When user clicking to free video link, then redirecting them to this video & showing the content. This is an easy case.
Case 2: The case you're having troubles:

- When user is still not logged in to the system, clicking to paid video link, then still redirecting them to a page as showvideo.aspx (We will display the content of the video on this page if user has paid), but at the back-end of this page (code behind) you should check like this:
+ If you logged -> save logged user's info to session variable.
+ At the back-end of showvideo.aspx, check: if session["LoggedUserInfo"] = null, then showing a warning message like "You need to login to the system to view this content..."

- If the user already logged to the system, then check as follows:
+ If if session["LoggedUserInfo"] != null, then continuing to check the user's role (the role is also save to a session variable).
--> If session["LoggedUserRole"] = 1 -> this one is paid user -> can view the content.
--> If session["LoggedUserRole"] <> 1 -> this one is free user -> cannot view the content -> display a message box like "You're unable to view this content...."

If you apply my suggestion to your code. I'm sure if someone is paid user, copy and send a paid video link to friends, then they cannot view that video, just showing a warning message like "You need to login to the system to view this content..." or "You're unable to view this content....".

However, in case, this user sent paid video link to friends and also give them user account & password, then the video will be displayed the content to them. We cannot handle this case.

Hope that make sense and helpful for you!
 
Share this answer
 
v2

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