2
votes

I've upgraded to a Windows 8.1 machine, and installed SQL Server 2012 (version 11.0.3128.0), and SQL Server Express 2008 R2 (v 10.0.5500.0).

I've created a database in the 2012 instance, and populated it by restoring it from a .BAK from another server.

I've opened Visual Studio 2012, and accessed the database via the Server Explorer, listing tables, etc., with no problem.

I've copied a web app, running on another machine, to this SAME machine, and opened it in Visual Studio 2012. But when I attempt to run in debug mode, my first attempt to access the database gives me this error:

Exception Level 1: The underlying provider failed to open

Exception Level 2: 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)

Exception Level 3: The network path was not found

Here's my connection string, as defined in the <connectionStrings> section of my App.Config:

<add name="EMSDataModelContainer" connectionString="metadata=res:///EMSDataModel.csdl|res:///EMSDataModel.ssdl|res://*/EMSDataModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=xps-8500;Initial Catalog=EMS;Integrated Security=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />

Thanks in advance.

1
Have you checked the Enable status of the protocols in the SQL Server Configuration Manager?Peter R
Did you ever solve this issue?Dave New
That project has gone away, so I do not know if I'll ever need to solve this issue. A big thank you to all who offered help.Ed McCarroll

1 Answers

0
votes

Check the event viewer. In my case, the SQL server was expired.