Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

MS SQL Server and the web application are both on the same machine.

In web.config, I have:

   Integrated Security=true"

I created a new Windows user account named MyWebsite. This account is assigned to application pool and my web application is using it.

In SQL Server Management Studio:

  • MyWebsite account is added in Security -> Logins
  • MyWebsite account is added in MyDatabse -> Security -> Users.
  • db_owner option is checked

In SQL Server Security Manager, all protocols are allowed.

I'm still getting the following error message:

 A network-related or instance-specific error occurred while establishing a connection to SQL Server'
 Error 26 - Error Locating Server/Instance Specified

Am I missing something?

share|improve this question
Problem was in external class library - Linq to SQL is using different connection string in app.config file – panda123 Apr 30 '12 at 22:12
up vote 1 down vote accepted

You don't need to specify the instance name when you're connecting to the default instance.

Just use COMPUTER_NAME for the server.

share|improve this answer

It's a lot easier in the long run if you just use localhost instead of the server or instance name for your connection settings.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.