限制用户在单个系统中使用Web应用程序 [英] restrict the user to use the web application within a single system

查看:71
本文介绍了限制用户在单个系统中使用Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,
我正在使用C#.net,asp.net和.net框架2.
我想限制用户在办公室的特定系统中使用Web应用程序,而不要在家中或其他任何地方.
这意味着如果我想让用户在特定系统中使用该应用程序.
怎么做
预先感谢,
George

Hi Friends,
I am using C#.net ,asp.net and .net framework 2.
I want to restrict the user to use the web application within a particular system in office not from home or any other place.
That means if I want to give the user to use the application in a particular system.
How to do this
Thanks in advance,
George

推荐答案

我能想到的唯一方法是限制您的Web应用程序只能使用特定范围的IP地址.

获取客户端的IP地址,如果它不在您的允许"列表中,则用漂亮的页面说明原因,拒绝用户.

容易做到:
The only way I can think of is to restrict your web app to only work with a specific range of IP addresses.

Get the IP address of the client, and if it isn''t in your "permitted" list, reject the user with a pretty page explaining why.

Easy to do:
string ClientIP = Request.ServerVariables["REMOTE_ADDR"];


跟踪IPAddress,在某些文件或数据库中列出列入黑名单的IPAddress.

如果在数据库或文件中保存的列表中找到站点,请在站点加载时检查用户的IPAddress.

将用户发送到显示消息您的机器无权查看此站点"的页面.

就是这样,希望你明白我的意思...:)
Track the IPAddress, Make a list of blacklisted IPAddress in some file or database.

Check IPAddress of user when the site loads if it is found in the list you kept in DB or file.

Send user to some page showing message "your machine is not authorized to view this site".

Thats it, Hope you got my point...:)


这篇关于限制用户在单个系统中使用Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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