限制对使用c#开发的ASP.NET网页的访问 [英] Restrict access to an ASP.NET web page developed using c#

查看:94
本文介绍了限制对使用c#开发的ASP.NET网页的访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想限制对网页的访问,即应从特定的计算机列表中打开它.如何在ASP.NET中使用c#做到这一点.请指定识别计算机的不同方法,从而限制对未授权计算机的访问.

Hi,

I want to restrict the access to a web page i.e it should be opened from a specific list of computers. How can I do that using c# in ASP.NET. Please specify the different ways of identifying a computer and thereby restrict the access to unauthorized computers

推荐答案

您实际上无法从服务器识别计算机-或在至少不会以某种方式无法被欺骗.

IP地址是基于路由器的-实际的PC信息无法通过路由器获取,因此,例如ADSL线路上的所有PC都将使用相同的IP地址来标识.
您无法获取的MAC地址,因为它们也不会通过路由器.
唯一地将PC识别为允许在此处"的唯一方法是在PC上使用Cookie,但这并不是那么安全.

处理此问题的正常方法是允许基于用户的访问,而不是基于用户操作的工作站.
You can''t in practice identify a computer from the server - or at least not in a way that can''t be spoofed in some manner.

IP addresses are router based - the actual PC information does not get through the router, so all PC''s on an ADSL line for example would be identified by the same IP address.
MAC addresses you can''t get at because they also don''t pass through the router.
The only way to uniquely identify a PC as "allowed in here" is to use a cookie on the PC, but it''s not that secure.

The normal way to handle this is to allow access based on user, rather than the work station the user is operating at.


这篇关于限制对使用c#开发的ASP.NET网页的访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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