0

I have this connection string

<add name="ApplicationServices" connectionString="Data Source=local;Initial Catalog=mycatalog;Integrated Security=True"
      providerName="System.Data.SqlClient"/>

The problem is that I think the data source of local is wrong because I keep getting this error

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)

What should be the right connection string?

4

1 に答える 1

1

use

  • (local)
  • localhost
  • .

That's right, just a ./dot

Add parenthesis around local if you prefer that

于 2012-05-21T13:16:16.487 に答える