I am trying to switch between DbContext
and System.Data.SqlClient
as my database connection for my .NET project in Visual Studio.
I have called the SqlConnection
object and passed the connection string found in the web.config
file as a parameter for its constructor.
When I try to open the session, I get an error
Named Pipes Provider, error: 40 - Could not open a connection to SQL Server.
What's the problem?