Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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) (Microsoft SQLserver ,error:53)
Posted

Please, carefully read the message error: Verify that the instance name is correct and that SQL Server is configured to allow remote connections..

Here is few links. Please read it to find a solution.
Configure the remote access Server Configuration Option[^]
Configure a Server to Listen on an Alternate Pipe (SQL Server Configuration Manager)[^]
How to: Enable the TCP/IP Protocol for a Database Instance[^]
Configure the Windows Firewall to Allow SQL Server Access[^]
Named Pipes vs. TCP/IP Sockets[^]
 
Share this answer
 
This is not a problem we can solve: we have no access to your system.
Try connecting via SSMS and see what you need, there, or use VS and it will provide you with a connection string:
Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900