未注册用户只能下载一本书,如果他想下载一本书以上,则他必须以注册用户身份登录,并且注册用户也有下载限制... [英] 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...

查看:81
本文介绍了未注册用户只能下载一本书,如果他想下载一本书以上,则他必须以注册用户身份登录,并且注册用户也有下载限制...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前需要用户登录才能从我的网站下载图书,我需要任何人只能下载一个文件而无需登录意味着要说未注册用户只能下载一本书.如果他想再下载一本书,那么他必须以注册用户身份登录,并且注册用户每天最多可以下载10本图书.
请指导我我该怎么做
如果可能的话,请为我提供易于理解的代码或完全基于totural的plz,因为我是asp.net的新手.

预先感谢

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

推荐答案

正如SA所说,如果没有在您的网站上注册,就无法有效控制他们可以进行的下载次数.

您必须选择可以使用的选项

1.客户访问您网站的IP地址

但并非所有Internet连接都使用固定IP,因此一个以上的人可以使用相同的IP地址

2. Cookies

这会在用户的临时Internet目录中写一些内容,您可以检查/读取它.但是用户或AV Suites可以将其从计算机中删除.


进一步阅读 Cookies概述 [
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[^]


如果您不使用登录名,则无法识别您的用户.您只能记住客户端的IP,但是对于一个以上的用户,它可以是相同的,对于同一用户,它可以是不同的,并且会随时间变化时间等等.我会说:忘记了主意.使用用户身份验证或允许无限下载.

—SA
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


这篇关于未注册用户只能下载一本书,如果他想下载一本书以上,则他必须以注册用户身份登录,并且注册用户也有下载限制...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆