MembershipCreateStatus.InvalidPassword 如果我传递简单的单词
我总是得到结果invalidpassword
。我总是为所有用户传递Password="mypassword"
。它是默认的
Membership.CreateUser(Constitid, Password, Email, question, Status, true, out result);
在 web.config 文件中:
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="/"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"
passwordStrengthRegularExpression="" />
传递简单密码不起作用?怎么解决这个问题?
I am getting results always invalidpassword
. I am always passing for all users Password="mypassword"
. It is default
Membership.CreateUser(Constitid, Password, Email, question, Status, true, out result);
In web.config file:
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="/"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"
passwordStrengthRegularExpression="" />
Passing simple password will not work? how to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
反汇编 SqlMembershipProvider 后,它在以下情况下抛出 InvalidPassword - 标记为 **
我的猜测 - 检查您是否覆盖 MembershipProvider.ValidatingPassword 事件
After disassembling SqlMembershipProvider, it throws InvalidPassword in following cases - marked with **
my guess - check whether you override MembershipProvider.ValidatingPassword Event