SQL Server Express 2005 Remote Connections
I developed an ASP.NET site connecting to a local SQL Server Express 2005 instance on my development box. To further my informal testing, I wanted to host the site under IIS 7 on a Windows Server 2008 box, but I wanted to just use the same database remotely. I got the following error message when the site tried to hit the database:
"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 connection to SQL Server)"
Apparently SQL Server Express 2005 is not automatically configured for remote access during installation (which really isn’t surprising as it is the Express version). Remote connections can be enabled though with a few relatively painless steps. See the following link for the procedure:
- Configuring SQL Server Express 2005 for Remote Access when SQL Server does not allow remote connections
Hope this is helpful.