So, you delete your database on App_Data
You call

WebSecurity.InitializeDatabaseConnection

then you get SqlException

Cannot attach the file ” as database ”

the data source use

Data Source=(LocalDb)\v11.0

 

How to fix?

Simply create empty database by add new item on App_Data

and that’s it !

Advertisements