Link to home
Start Free TrialLog in
Avatar of praveen1981
praveen1981Flag for India

asked on

database error

Hi,

i am using entity frame work datafirst and my connection string contains as follow


  <add name="DefaultConnection" providerName="System.Data.SqlClient"
connectionString="Data Source=(LocalDb)\v11.0;
Initial Catalog=aspnet-Core.Portal-20131125172348;
Integrated Security=SSPI;
AttachDBFilename=|DataDirectory|\aspnet-Core.Portal-20131125172348.mdf" />  



now i am getting following error


Cannot attach the file

'D:\Halcyon\Projects\GymTrainer\Trunk\Core.Portal\
App_Data\aspnet-Core.Portal-20131125172348.mdf'
 
as database 'aspnet-Core.Portal-20131125172348'.


could you please say me how to resolve it. most of sites saying to delete database,

but don't we have any other solution with out deleting it.
Avatar of Ivo Stoykov
Ivo Stoykov
Flag of Bulgaria image

Look here and here. Hope you'll find a solution.

HTH

Ivo Stoykov
ASKER CERTIFIED SOLUTION
Avatar of 13Shadow
13Shadow

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of praveen1981

ASKER

Thanks