简体   繁体   English

如何使用VS 2010 / ASP.Net / VB.Net创建安全的登录页面?

[英]How to create a secure login page using VS 2010/ASP.Net/VB.Net?

I would like to create a secure login page for a pre-defined set of users (so no creating username/passwords by the users themselves). 我想为一组预定义的用户创建一个安全的登录页面(因此,用户自己无需创建用户名/密码)。 I've looked up a few sites and they all seem to suggest using Microsoft's Membership or something. 我查找了一些站点,它们似乎都建议使用Microsoft的Membership或其他功能。 I am not very sure as to why that's used, but all you need to know is that I will be creating the login details. 我不确定为什么要使用它,但是您只需要知道我将创建登录详细信息即可。 I just need to make the login secure, ie, no duplicate logins, no logins from different browsers and cookies and sessions and encryption and all that. 我只需要确保登录安全即可,即,没有重复的登录,没有来自不同浏览器的登录,cookie和会话以及加密等等。 Any one have the code/links to where I can get all this? 有人拥有我可以从中获得所有这些的代码/链接吗? Thanks in advance. 提前致谢。

You have a couple of options here. 您在这里有几个选择。

Case 1 : Role your own security but bear in mind you will oversee something. 情况1:扮演自己的安全角色,但请记住,您将监督某些事情。 Security isn't easy and its sooo easy to overlook something. 安全性并不容易,而且容易被忽视。 Hashing , salting , encryption etc... 散列,加盐,加密等...

Case 2: If its a simple site just use Microsoft memberschipprovider. 情况2:如果它是一个简单的站点,则使用Microsoft memberchipprovider。 It is good and they spend 3 years tweaking / patching it. 很好,他们花了3年时间对其进行调整/打补丁。 You can also override the memberschipServiceprovider to implement some additional security. 您还可以重写memberschipServiceprovider,以实现一些附加的安全性。 or to tell the memberschipprovider what data should be used. 或告诉memberschipprovider应该使用哪些数据。

Optional: Extend your ISS server with this open-source firewall : http://www.aqtronix.com/?PageID=99 It provides some cool features for "free"(If you have access to install it). 可选:使用此开源防火墙扩展ISS服务器: http ://www.aqtronix.com/?PageID=99它为“免费”提供了一些很酷的功能(如果您有权安装它)。

The best security is when you find the balance between secure and accessible vs Top-security and inaccessible. 最好的安全性是在安全性和可访问性与最高安全性和不可访问性之间找到平衡时。

And to answer the link part of your question: http://www.owasp.org/index.php/Main_Page 并回答您问题的链接部分: http : //www.owasp.org/index.php/Main_Page

If you want more information on microsofts' memberschipprovider : Google :) or Bing or yahooooo! 如果您想了解有关Microsoft的memberschipprovider的更多信息:Google :)或Bing或yahooooo!

Goodluck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM