【发布时间】:2015-09-27 02:18:05
【问题描述】:
所以我成功地获得了创建和初始化身份数据库的解决方案。现在的问题是,当我正在处理它时,我不断收到此错误
Cannot create file 'C:\Webs\SomeScheduler\SomeScheduler\App_Data\SomeSchedulerUsers.mdf'
because it already exists. Change the file path or the file name, and retry the operation.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Description: An unhandled exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and where it originated in
the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot create file
'C:\Webs\SomeScheduler\SomeScheduler\App_Data\SomeSchedulerUsers.mdf'
because it already exists. Change the file path or the file name, and retry the operation.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
我知道它已经存在,这就是我想要的。 当我在开发这个网站时每次尝试运行我的代码时,如何阻止它重新创建它?
与往常一样,非常感谢任何和所有帮助。
【问题讨论】:
标签: c# asp.net entity-framework asp.net-identity