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?

1
  • in SQL Server Management studio, right click your database and click 'view connection properties' and verify that server name and other variables are correct and matches your connection string Commented May 21, 2012 at 13:18

1 Answer 1

1

use

  • (local)
  • localhost
  • .

That's right, just a ./dot

Add parenthesis around local if you prefer that

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.