2
Reply

IIS Database Connection ASP.net

Tharindu N Chathuranga

Tharindu N Chathuranga

May 7 2015 12:44 AM
671
 Error : Cannot create file 'E:\NikiniINT\App_Data\aspnet-Nikini_Intranet_002-20141204101622.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.
 
I have removed initial catalog part from connectionStrings. 
 
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-Nikini_Intranet_002-20141204101622.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
 
 

Answers (2)