如何在ASP.Net网站上验证用户 [英] How to authenticate user in ASP.Net website

查看:91
本文介绍了如何在ASP.Net网站上验证用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的公司网站。如果任何用户从我的公司场所冲浪,那么它应该打开,用户将能够浏览页面。但是,如果任何用户将从外部访问它,它应该提示用户输入用户ID和密码。我怎样才能做到这一点?我正在ASP.Net开发网站C#

I have my company website. If any user surf it from my company premises, then it should get open and user will able to browse pages. However if any user will access it from outside premises, it should prompt user to enter userid and password. How can I achieve this? I am developing website in ASP.Net C#

推荐答案

看起来你正在寻找Windows身份验证 - http://msdn.microsoft.com/en-us/library/ff647405.aspx [ ^ ]。
Looks like Windows Authentication is what you are looking for - http://msdn.microsoft.com/en-us/library/ff647405.aspx[^].


是的,因为Abhinav S说你有去进行Windows身份验证。如果您的方案更复杂,您还可以尝试使用Active Directory的表单身份验证,如下所示。



http://msdn.microsoft.com/en-us/library/ff650307.aspx [ ^ ]
Yes, as Abhinav S said you have to go for Windows Authentication. If your scenarios are more complex you can also try to use Forms Authentication with Active Directory as below.

http://msdn.microsoft.com/en-us/library/ff650307.aspx[^]


这篇关于如何在ASP.Net网站上验证用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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