如何创建仅在指定PC上运行的ASP.Net应用程序. [英] How to create an ASP.Net application which runs only on specified pcs.

查看:114
本文介绍了如何创建仅在指定PC上运行的ASP.Net应用程序.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个开发ASP.Net应用程序的业务需求,该应用程序将托管在Web服务器上,并且该应用程序只能在允许访问该应用程序的那些PC上运行.要求是绑定许多PC,这些PC将仅在那些可以访问应用程序的分支机构中存在.我没有任何静态IP或指定的用户,仅要求将应用程序与PC绑定.我只有提供给我的机器信息.我如何从ASP.Net获取有关计算机的特定信息并进行验证?我应该遵循哪种方法,以寻求建议.在此先感谢...

Hi,
I have a business requirement to develop an ASP.Net application which would be hosted on Web server and application would run on only on those pc''s which are allowed to access that application. The requirement is to bind a number of pc''s which will be in various branch offices only those can access application. I don''t have any static IP''s or specified users, only the requirement is to bind the application with PC''s. I have only the machines information which is provided to me. How could i get the machine specific information from ASP.Net and verify it? Which approach i should have to follow, looking for suggestions. Thanks in advance...

推荐答案

您可以像这样从Request对象获取客户端信息:
You can get the client information from the Request object like this :
Request.ServerVariables["REMOTE_HOST"]
Request.ServerVariables["REMOTE_ADDR"]



并获取主机名:



And to get the hostname :

System.Net.Dns.GetHostEntry(Request.ServerVariables["REMOTE_ADDR"]).HostName


如果您要进入网络域,请使用Active Directory用户并向Windows进行网站身份验证.因此它会照顾所有人,而不是编写代码..否则,您必须手动处理...

提供有关环境的更多详细信息...
if you are into a network domain use the Active directory users and make the website authentication to Windows. so it will take care all instead of writing the code.. otherwise you have to handle manually...

Provide more details about the eenvironment...


您可以从下面的url
中看到服务器版本.
请求对象列表(服务器变量) [
you can see the server veriables from the below url

A list of Request Objects (server variables)[^]

ASP.NET cannot get all the information from the client due to security..

what you can do is,you can have a admin windows ui to setup the permission. also you can use some cookies (have to write one cookie in each client) to verify those at run time... But this you have to do in the each client machine, also don''t clear the cookies...


这篇关于如何创建仅在指定PC上运行的ASP.Net应用程序.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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