VS 2013,Framework 4.5.1 ……
我运行Aspnet_regsql.exe来创建架构.它创建了带有下划线的表:例如aspnet_Users.它还创建了相关的存储过程.这些存储过程确实有效,并且它们会向表中添加记录:例如,用户被添加到aspnet_Users中.
当我尝试使用Login.aspx时,它在manager.find上崩溃并出现错误:“无效的对象名称’dbo.AspNetUsers’.”
protected void LogIn(object sender,EventArgs e) { if (IsValid) { // Validate the user password var manager = new UserManager(); ApplicationUser user = manager.Find(UserName.Text,Password.Text); if (user != null) { IdentityHelper.SignIn(manager,user,RememberMe.Checked); IdentityHelper.RedirectToReturnUrl(Request.QueryString["ReturnUrl"],Response); } else { FailureText.Text = "Invalid username or password."; ErrorMessage.Visible = true; } } }