Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 38769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:45:36+00:00 2026-05-10T14:45:36+00:00

An error has occurred while establishing a connection to the server. When connecting to

  • 0

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)

Hello I am new on developing on SQL Server 2005. I’ve worked for several years with SQL Server 2000, but after doing the usual stuff I do to connect to the server I get this exception on the web server.

There are several links on google that point me to possible solutions, but none of them have solved my problem. I’ve made changes on a ‘Surface Area whatever…’ dialog (What the hell is that??? Why does SQL Server has changed so much??? It seems so complicated now).

I have ensured that SQL Server 2005 is configured properly to allow incoming connections on the instance of database server. I also have selected Automatic as the Startup type to start SQL Server Browser service automatically every time system starts. And no, there is no firewall running.

I’ve tried changing the connection string to connect using a port, to connect using the IP, to connect using the instance name…

Nothing seems to work, I’m still getting the same error. Any hint?

Answering the questions that people have made: Yes, I can connect using management studio from a different computer. Yes, I’m sure it’s configured to accept local and remote TCP/IP and named pipes. Yes, I restarted the server.

I am using Mixed mode security, which I already enabled. I already enabled the sa user. I am able to connect to the database using a .udl file, and I’ve checked that my connection string is OK. I can connect to the database using DBArtisan and SQL Server client tools. I can do that both on the server and on a different machine. Even with all that…

The website is still unable to connect.

New update… I’ve been struggling all day with this problem, and still haven’t found out the cause. It seems that the error message I posted is a generic error that .net gives when it’s not able to connect. I placed trash on the connection string (typing servers that don’t exist) and I still get the same error.

These are some of the connection strings I’ve used on the server:

connectionString=’Integrated Security=SSPI; Data Source=SERVER; Initial Catalog=db; Network Library=DBMSSOCN;’

connectionString=’Data Source=SERVER; Initial Catalog=db; User ID=sa; Password=xxxxx;’

connectionString=’Data Source=SERVER\MSSQLSERVER; Initial Catalog=db; User ID=sa; Password=xxxxx;’

I tried to register the sql server instance using some strange command, I found that here: http://kb.discountasp.net/article.aspx?id=1041 To do that I used the aspnet_regsql.exe tool. It’s still not working…

I also know that the server has the latest version of MDAC installed on it. The only thing that I’m suspicious on is that the server has two Database engines: SERVER and server\sqlexpress

Does that has something to do with the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:45:36+00:00Added an answer on May 10, 2026 at 2:45 pm

    I fixed the issue that I had with the connection. The problem was on my application. The cause of the issue was that a connection string to the development (instead of the production) database, was hardcoded by one of the dialogs that generates the datasets. This dialog placed the connection string both on the web.config, and on a hidden sourcecode file called ‘Settings.settings.cs’. The problem was solved by fixing the connection string to the correct location.

    The error message was totally misleading, but I was able to find that by following all the methods presented on the stack trace.

    So if you ever find this error message, there are tons of possible causes. Your first bet is to follow the usual steps for this error, which are checking that the server allows remote and local connections, and restarting the browser service.

    If that doesn’t work, check the stack trace, look for code that is in your application, put a break point there and explore all the properties on the connection string. At least that’s how I solved it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 90k
  • Answers 90k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You might find that batching several changes under one lock… May 11, 2026 at 6:01 pm
  • Editorial Team
    Editorial Team added an answer Just found how to do it :) Declaring a variable… May 11, 2026 at 6:00 pm
  • Editorial Team
    Editorial Team added an answer You could set a boolean that you're already checking scroll… May 11, 2026 at 6:00 pm

Related Questions

I can connect to my SQL Server database via sqlcmd from a DOS command
I recently got a new machine at work, and moved from XP 32 Bits
I'm trying to track down possible causes of my app not being able to
For some reason every 3-5 days our web app loses the ability to open

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.