I am creating a project which runs perfectly on my system but when installed on other system it will throw errors

-1

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

Exception

System.Data.SqlClient.SqlException (0x80131904): 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified

c#
sql-server
database
asked on Stack Overflow Apr 10, 2020 by Zakir Khan • edited Apr 10, 2020 by marc_s

1 Answer

0

This is not an installation issue. The error means that there was an issue trying to connect to the database server. Check your connection string to see where the database is located and make sure this new environment is able to access it.

answered on Stack Overflow Apr 10, 2020 by KingOfArrows

User contributions licensed under CC BY-SA 3.0