I'm very frustrated. I have a website running on Visual Web Developer 2008 Express with my local database, everything works great. I also have the same web site running on a production server. Everything was working great but tonight I did a "reset" on production.
I deleted a couple of table, re-created them and inserted data. Everything was ok at this time.
I deleted ALL the files via the FTP.
I used the module called "Copy website" in visual studio and copy the site to the website via FTP.
When I log on my website, here is the error I got:
Server Error in '/' Application.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Nothing has changed related to SQL connection, this is OLD code that I always used. My website is completely paralysed because of this and I feel sick inside because I feel there is nothing I can do.
Can anyone help me please?
I had same problem regarding that i.e A network-related or instance-specific error occurred while establishing a connection to SQL Server.
I was using SQL Server 2005 (.\sqlexpress)` and worked fine but suddenly services stopped and gave me error.
I solved it like this,
I've resolved the issue. It was due to the SQL browser service.
Solution to such problem is one among below -
Check the spelling of the SQL Server instance name that is specified in the connection string.
Use the SQL Server Surface Area Configuration tool to enable SQL Server to accept remote connections over the TCP or named pipes protocols. For more information about the SQL Server Surface Area Configuration Tool, see Surface Area Configuration for Services and Connections.
Make sure that you have configured the firewall on the server instance of SQL Server to open ports for SQL Server and the SQL Server Browser port (UDP 1434).
Make sure that the SQL Server Browser service is started on the server.
link - http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1