0

Everything works fine on the computer that I built the application on, both the database and the program were created in vs2017. When I install the application on another computer that has sql but not vs installed, it gives me 'error 52 a network related issue has occurred unable to connect to local database.' How am I supposed to get it to see the database on another users computer other than my own? I was able to successfully get my app to work on a different computer that has vs and sql installed, but I dont want to install 50GB worth of excess on every computer.

Below is my connection string

<add name="ExagridEntities" connectionString="data source=(LocalDB)\MSSQLLocalDB;AttachDBFilename=|DataDirectory|Exagrid.mdf;" providerName="System.Data.EntityClient" />

I have tried publishing from visual studio by clicking project>publish and also creating a setup project where I put the mdf file in with the application files but they both returned the same error 52.

UPDATE

When I installed visual studio on one of the computers my program ran just fine. Does anyone know what package I need so I can just run the program without having to install vs?

Mr.Finch
  • 15
  • 7
  • The error is pretty explicit : 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: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)] System.Data.SqlClient.SqlInternalConnection , Make sure that the db and sql agent are configured. – Claudio Corchez Jun 06 '19 at 21:21
  • @ClaudioCorchez configured to what. I tried running it on a computer that has sql express on it and it still didn't work – Mr.Finch Jun 06 '19 at 21:23
  • check this out: https://stackoverflow.com/questions/18060667/why-am-i-getting-cannot-connect-to-server-a-network-related-or-instance-speci – Leo Oct 30 '19 at 20:15

0 Answers0