I have a WCF Service which is hosted in a windows service, and when it connects to the localdb database it produces the following error:
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. The specified LocalDB instance does not exist
This is my connection string:
<add name="CredentialEntities"
connectionString="metadata=res://*/Credential.csdl|res://*/Credential.ssdl|res://*/Credential.msl;provider=System.Data.SqlClient;provider connection string="Data Source=(localdb)\projects;Initial Catalog=Credentials;Integrated Security=True""
providerName="System.Data.EntityClient" />
I can connect to this database via SQL Server Management Studio no problem, and I can also connect via Visual Studio data connections to the data source. When I run the windows service as my account it works successfully.
I have tried adding the NT AUTHORITY\SYSTEM
account as a sysadmin in SQL Server, but no luck