MVC 3 应用程序的用户/PW 系统
所以我读过很多关于网络应用程序密码系统的文章,它们看起来都非常令人困惑。有人说你需要对你的 PW 进行哈希处理并建立 https 安全连接,其他人则说你只需要对你的 PW 进行哈希处理并加盐。
我只知道,在执行了数百万次之后,可能有某种库可以为我在客户端输入的密码做很多事情,并为我提供一些安全保存在我的 SQL Server 中的内容2008年数据库。
我需要担心所有 https 安全连接的问题吗?我可以确保我正确地散列密码吗?为了散列它,我是否需要任何外部库,或者我可以完全在 .NET 中创建一个安全的用户/密码系统吗?
我以前从未这样做过,所以任何文章、提示、链接都会非常有帮助。谢谢。
So I've read numerous articles on a password system for a web app, and they all seem very confusing. Some say you need to hash your PW's AND establish an https secure connection, others say you just need to hash AND salt your PW's.
I just know, after this has been done millions of times, there's PROBABLY some sort of library out there that can do a bunch of things for me for a password inputted on a client side, and give me something to save securely in my SQL Server 2008 database.
Do I need to worry about all the https secure connection stuff? Can I just make sure I hash the PW correctly? To hash it, do I need any external libraries or can I create a secure user/pw system entirely in .NET?
I've never done this before so any articles, tips, links would be very helpful. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您不想自己动手,可以随时使用 ASP.Net 会员资格
配置 ASP.NET 应用程序以使用成员身份
github 上还有一个项目,名为 MVC 会员入门工具包
If you don't want to roll your own you can always use ASP.Net Membership
Configuring an ASP.NET Application to Use Membership
There's also a project on github called Membership Starter Kit for MVC
默认的 MVC3 Internet 应用程序模板(文件新项目)已为您提供了此设置,只需将 [Authorize()] 添加到您想要保护的控制器/方法即可。不要推出新的东西,使用现有的东西。此外,请使用 SSL,因为有人可以通过嗅探流量并简单地使用您的 cookie 轻松窃取会话。就是这么简单。
The default MVC3 Internet Application template (file-new project) has this setup for you already, simply add [Authorize()] to the controllers/methods you want to protect. Don't roll something new, use what's there for you. In addition, please use SSL as someone can easily steal a session by sniffing traffic and simply using your cookie. It's that easy.