简体   繁体   English

发生类型为'System.Data.SqlClient.SqlException'的异常

[英]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.

相关问题 SqlException was Unhandled An unhandled exception of type 'System.Data.SqlClient.SqlException'发生在 System.Data.dll - SqlException was Unhandled An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll 错误:System.Data.dll 中发生类型为“System.Data.SqlClient.SqlException”的未处理异常 - Error :An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll System.Data.dll中发生类型为'System.Data.SqlClient.SqlException'的异常,但未在用户代码中处理 - A 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”的未处理异常; - An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll; System.Data.dll 中出现“System.Data.SqlClient.SqlException”类型的异常 - An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll System.Data.dll 中出现类型为“System.Data.SqlClient.SqlException”的未处理异常,网络相关 - An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll, network releted System.Data.dll中发生了类型为'System.Data.SqlClient.SqlException'的未处理的异常 - An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll 得到错误“ System.Data.dll中发生类型为'System.Data.SqlClient.SqlException'的未处理的异常” - getting error “An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll” System.Data.dll 中出现“System.Data.SqlClient.SqlException”类型的未处理异常附加信息 - An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dllAdditional information 关于在System.Data.dll中发生类型为'System.Data.SqlClient.SqlException'的未处理异常 - About the an unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM