[RESOLVED]Cannot drop the database 'test', because it does not exist or you do not have permission.

I have problem with MVC identity. Connection string is correct. 

On this commands i get error:

Cannot drop the database ‘test’, because it does not exist or you do not have permission.

on this commands

var user = await UserManager.FindByNameAsync(userName);
var result = UserManager.Create(user, model.Password);

Any hint?

Thanks

Hi,

What’s the connectionstring like?

According to your description, I think you changed the entity, it leads to recreate the database.

Please check whether the database are exist. If it exists, please delete it and remove the connection in the Server Explorer. Also please delete the database in the SQL Server Object Explorer if needed.

Best Regards

Starain

Leave a Reply