So, I had the following scenario at a customer:
- They were moving a SQL Server 2000 database from one server to another
- All of the references to connection strings in the application were updated to point to the new database
- The data was moved from the old database to the new database and the old database was shut down
Everything seemed great; however, there was one ASP.NET 2.0 application that kept throwing the following error:
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)
We scratched our heads for awhile on this. We couldn't figure out why it was throwing a 2005 error when the database we were connecting to was 2000. Further, we were absolutely positive that we had updated all of the connection strings...until I remembered that this application used a membership provider for authentication that was defined in the machine.config configuration file. We updated the machine.config, and everything started to run without error.