I've created this MVC4 web application and went with a local MDF (localdb?). It's located in the \App_Data
folder of my project. It's name is SiteDatabase.mdf
.
But right now im struggling with the connection string, how can I "link" it up?
I got this:
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=SiteDatabase;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\SiteDatabase.mdf" providerName="System.Data.SqlClient" />
Where SiteDatabase.mdf is located in my App_Data
folder.
The error Im getting:
Server Error in '/' Application.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.)