简体   繁体   English

ASP.NET SQL 配置

[英]ASP.NET SQL Configuration

I created an ASP.NET Website with "Individual user accounts" authentication.我创建了一个带有“个人用户帐户”身份验证的 ASP.NET 网站。 I want to know how I can modify the SQL Database that stores the user info so I can change the minimum amount of characters needed to create a password on my web site.我想知道如何修改存储用户信息的 SQL 数据库,以便可以更改在 web 站点上创建密码所需的最少字符数。 Thank you.谢谢你。

Take a look at this tutorial: https://docs.microsoft.com/en-us/aspnet/mvc/overview/security/create-an-aspnet-mvc-5-web-app-with-email-confirmation-and-password-reset看看这个教程: https://docs.microsoft.com/en-us/aspnet/mvc/overview/security/create-an-aspnet-mvc-5-web-app-with-email-confirmation-and -重设密码

If you look closely to the database table, you will notice the PasswordHash and you will also notice that there is no password field.如果您仔细查看数据库表,您会注意到PasswordHash并且您还会注意到没有密码字段。

That is because we don't store passwords in databases.那是因为我们不在数据库中存储密码。 Since the password is not there, you can't apply rules to it.由于密码不存在,因此您无法对其应用规则。

You must implement the checks, serverside instead of database, just before registration.您必须在注册之前实施检查,服务器端而不是数据库。

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

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