Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
currently users are needed to login to download books from my website, i need that any one can download only one file only without login mean to say unregistered user can download one book only.and if he want more then one book to download then he must sign in as a register user and there is also restriction for registered user to download upto 10 books per day.
Please guide me how i ca do that
If possible then please provide code or fully toturial based plz easy to undersatnd for me because i am new in asp.net.

thanks in advance
Posted
Updated 5-Oct-11 2:10am
v6
Comments
Chris Meech 5-Oct-11 8:25am    
Can you provide a clearer definition of "unregistered user". By what means are you trying to identify users? Is it by some session identifier you provide to the browser? Does each user provide a userid and password instead?
genious Developer 5-Oct-11 8:31am    
unregister user mean any one who visit website first time.mean to say never registered or fill signup page on my website.i think now you understand.and yes i manage sessions.only registred user provide userid and password
Sergey Alexandrovich Kryukov 5-Oct-11 9:33am    
This is the whole point. Simon and I tried to explain why this is impossible. During one session this is trivial, but when a session is closed and open again, there is no a valid way to tell if this is the same user or not without login.
--SA

As SA has put it there is no way to effectively control the number of downloads that they can do without having them register on your site.

you have to options that you can use

1. IP Addresses that the client visits your site

but not all Internet connections used fixed IP's so more than one person can use the same IP address

2. Cookies

This writes something in the users temporary Internet directory and you can check / read from it. BUT the user or AV Suites can remove this from the computer.


further reading Cookies Overview[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-Oct-11 9:31am    
Quite correct, and very good clarification about possible ways to identify the user, my 5.
Unfortunately, OP gets stubborn about the topic and insist that I did not understand the problem, confessed he voted 1 for my answer, maybe your one, too. I tried to explain again but don't know if it is possible or not. There are people who think that their "requirements" should be met only because they require them. :-)
--SA
Simon_Whale 5-Oct-11 9:39am    
Thanks SA :) I read his responses and have the same feeling about his stubornness to realise what he is after can't be achieve with out asking the user to supply some level of information directly or indirectly (which is honestly isn't very effective)
Sergey Alexandrovich Kryukov 5-Oct-11 11:48am    
Exactly.
--SA
BobJanova 5-Oct-11 11:45am    
5 for you as well
If you use no login you have no way to identify your user. You can only remember client's IP, but it can be the same for more then one user or different for the same user, changing from time to time, etc. I would say: forget the idea. Either use authentication of the users or allow unlimited downloads.

—SA
 
Share this answer
 
v2
Comments
genious Developer 4-Oct-11 3:53am    
i need that any one can download only one file without login mean to say unregistered user can download one file.and if he want more then one file to download then he must sign in as a register user and download upto 10 books per day.i think now you can understand
Sergey Alexandrovich Kryukov 5-Oct-11 2:03am    
Who cares what do you think you need? I explained you why you cannot implement that, period.
If you find a mistake in my considerations, be so kind to tell me about it.
Just curious: did you vote 1 here? Would be interesting to know why...
--SA
genious Developer 5-Oct-11 3:45am    
dear SAKryukov you answer is not according to my question.why i implement as you say.i want to implement the changes as i needed.so i ask question here.so how can i rate you more then 1 as your answer in not accoding to my question????
Sergey Alexandrovich Kryukov 5-Oct-11 8:01am    
The answer is not according your question because your question is incorrect. You and only you are responsible for this failure. Your requirement is logically incorrect, and your acceptance to the answer is mistaken to say the least.
--SA
genious Developer 5-Oct-11 8:06am    
dear SALryukov donot blame on me i think you are enough mature.how you say my reqirements are incorrect and logically incorrect.if you did not understand what i want then donot answer.i saw many time the same thing implemented which i need.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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