Every so often the error below is logged from the 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: Named Pipes Provider error: 40 - Could not open a connection to SQL Server)"
But on the next connection attempt it continues working as normal connecting successfully. (assuming via TCP)
In SQL Server Configuration Manager under SQL Server Network Configuration Named Pipes is disabled, Shared Memory and TCP/IP are enabled. So why is it even attempting to connect using named pipes ??
The application and SQL server are not on the same machine and i am using the IP address so shared memory shouldnt be used either , so from what i can tell connections should be defaulting to TCP
I dont want to just specify the port in the connection string e.g
Data Source=126.96.36.199,1433 or Data Source=tcp:188.8.131.52;
I am trying to understand why its making these attempts?
Am using SQL Server 2008 R2 and a .NET 3.5 console application
.net sql-server sql-server-2008 sqlconnection
share|improve this question
edited Apr 17 at 11:59
asked Apr 17 at 11:48
Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.
Browse other questions tagged .net sql-server sql-server-2008 sqlconnection or ask your own question.