[英]An exception of type 'System.Data.SqlClient.SqlException' occurred
An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code System.Data.dll中发生类型'System.Data.SqlClient.SqlException'的异常,但未在用户代码中处理
Additional information: Invalid column name 'PasswordFailuresSinceLastSuccess'. 附加信息:无效的列名称'PasswordFailuresSinceLastSuccess'。
if (ModelState.IsValid)
{
// Attempt to register the user
try
{
WebSecurity.CreateUserAndAccount(model.UserName, model.Password);
WebSecurity.Login(model.UserName, model.Password);
return RedirectToAction("Index", "Home");
}
catch (MembershipCreateUserException e)
{
ModelState.AddModelError("", ErrorCodeToString(e.StatusCode));
}
}
The error tells you that there is no such column PasswordFailuresSinceLastSuccess
inside your database table. 该错误告诉您,数据库表内没有此类列PasswordFailuresSinceLastSuccess
。
Maybe you have got a spelling mistake there. 也许那里有一个拼写错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.