entity framework - provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server 2012 express -


I was getting the following error while trying to connect to my SQLEXPRESS database using EF's Generate Database Wizard .

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 example name is correct and SQL Server is configured to allow remote connection. (Provider: Named Pipes Provider, Error: 40 - Connection can not be opened on SQL Server)

I have enabled TCP / IP for SQL XPPS as per the following question.

I only enabled TCP / IP settings (not changed IP2 and all) and restarted the SQL Server process.

After restarting the service, my server is not being searched in connection properties dialog window

Why is this happening? What should I do next?

I was just trying to set up an EF connection late at night. It turns out that I was not reading the connection settings correctly. I was just putting the name of the server computer in the 'server name' box and putting the example name in the 'database' box.

'must be the name of the server' (COMPUTERNAME) \ (INSTANCE) and the database must be the actual database name.

Hope this solves your problem!


Comments