Recently I started to see intermittent errors in log files of my web application. Raising from different places of the application the error is always about failed connection to DB which is located on another server:
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): Access is denied
OR
The underlying provider failed on Open.
----
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): Access is denied
....
at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
ClientConnectionId:00000000-0000-0000-0000-000000000000
I'm using Microsoft SQL Server Standard Edition (64-bit) 10.50.4000.0 on Win Server 2008 R2
I checked:
1 Database Autoclose is set to OFF
2 I have checked event logs of both APP and DB server and didn't find anything related to sqlserver or network errors. Event log however contains Schannel errors, but from I googled it is not related.