title: SQL Server 2005 has problems connecting to a website running on the same server
body: <p><em>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)</em></p>
  
  <p>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.</p>
  
  <p>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). </p>
  
  <p>I have ensured that SQL Server 2005 is configured properly to allow incoming connections on the instance of database server. I also have selected <em>Automatic</em> as the Startup type to start SQL Server Browser service automatically every time system starts. And no, there is no firewall running.</p>
  
  <p>I've tried changing the connection string to connect using a port, to connect using the IP, to connect using the instance name...</p>
  
  <p>Nothing seems to work, I'm still getting the same error. Any hint?</p>
  
  <p>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.</p>
  
  <p>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...</p>
  
  <p>The website is still unable to connect.</p>
  
  <p>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.</p>
  
  <p>These are some of the connection strings I've used on the server:</p>
  
  <p>connectionString="Integrated Security=SSPI; Data Source=SERVER; Initial Catalog=db; Network Library=DBMSSOCN;"</p>
  
  <p>connectionString="Data Source=SERVER; Initial Catalog=db; User ID=sa; Password=xxxxx;"</p>
  
  <p>connectionString="Data Source=SERVER\MSSQLSERVER; Initial Catalog=db; User ID=sa; Password=xxxxx;"</p>
  
  <p>I tried to register the sql server instance using some strange command, I found that here:
  <a href="http://kb.discountasp.net/article.aspx?id=1041" rel="nofollow noreferrer">http://kb.discountasp.net/article.aspx?id=1041</a>
  To do that I used the aspnet_regsql.exe tool. It's still not working...</p>
  
  <p>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</p>
  
  <p>Does that has something to do with the problem?</p>