blazingbiz:I don't use the database in the local App_Data folder I just create them in a central and separate folder on my computer and attach them to my SQL server Express instance with Management Studio Express and use it from there.
blazingbiz:<add name="DatabaseConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DatabaseName.mdf;Integrated Security=SSPI;User Instance=True"
providerName="System.Data.SqlClient"/>
Hi blazingbiz,
Instead of the “DatabaseName.mdf”, the database name in connection string should be “DatabaseName”. In addition, since the database is not in the “App_Data” folder and it has been attached to the SQL Server Express instance, we don't need “User Instance”. So, please change the connection string:
<add name="DatabaseConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DatabaseName;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>