升级到MS身份核2.0和EF6.1登录失败:无效的列名“电子邮件” [英] Upgraded to MS Identity Core 2.0 and EF6.1 and login fails: Invalid column name 'Email'
问题描述
我去管理的NuGet包选项和更新所有的包。我没有使用多少: LINQ到EF
6.1,并使 MS身份
工作所需的软件包。然而,有些东西打破了因为现在当我去登录,我得到一个错误
I went to the Manage NuGet Package option and updated all the packages. I'm not using much: Linq-to-EF
6.1 and the packages needed to make MS Identity
work. However, something broke because now when I go to log in, I get an error
Exception Details: System.Data.SqlClient.SqlException: Invalid column name 'Email'.
Invalid column name 'EmailConfirmed'.
Invalid column name 'PhoneNumber'.
Invalid column name 'PhoneNumberConfirmed'. //and so on
例外如下:
The exception looks like this:
什么可能再次发生时,我所做的只是更新的NuGet包造成这一点,如何解决和prevent呢?
What might have caused this and how do I fix and prevent this from happening again when all I did was just update the NuGet packages?
感谢。
修改:我解决了这个问题,通过完全删除数据库;应用程序重新创建一个新的数据库必要的列。我能做到这一点,因为该应用程序仍处于开发和没有真正的用户数据被卷入。不过,我仍然对这个问题感兴趣,因为当新的更新将被释放,我要确保我没有扔掉当前DB。
Edit: I resolved this issue by totally removing the database; the app recreated a new DB with the necessary columns. I was able to do that because the app is still in dev and no real user data was involved. However, I'm still interested in this issue because when new updates will be released, I want to make sure I don't have to throw away the current DB.
推荐答案
我解决了这个为通过删除 DefaultConnection
连接字符串我的申请。如果你有 DefaultConnection
和 MySpecialConnection
在您的配置文件,ASP.net身份似乎用 DefaultConnection
。
I solved this for my application by removing the DefaultConnection
connection string. If you have DefaultConnection
and MySpecialConnection
in your config file, ASP.net identity seems to use DefaultConnection
.
这篇关于升级到MS身份核2.0和EF6.1登录失败:无效的列名“电子邮件”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!