建立SQL Server的连接时出现与网络相关的或特定于实例的错误

问题描述:

我很沮丧。我有Visual Web上运行Developper 2008例preSS与本地数据库中的一个网站,一切都很正常。我也有同样的网站在生产服务器上运行。一切都是伟大的工作,但今晚我做了对生产复位。

I'm very frustrated. I have a website running on Visual Web Developper 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.

  1. 我删除了几个表,重新创建它们并插入的数据。一切OK了在这个时候。

  1. I deleted a couple of table, re-created them and inserted data. Everything was ok at this time.

我通过FTP删除所有文件。

I deleted ALL the files via the FTP.

我用所谓的复制网站,在Visual Studio中的模块,并通过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.

建立SQL Server的连接时出现与网络相关的或特定于实例的错误。服务器找不到或无法访问。验证实例名称是否正确,以及SQL Server配置为允许远程连接。 (提供者:SQL网络接口,错误:26 - 错误查找服务器/实例指定)

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)

说明:当前Web请求的执行过程中发生未处理的异常。请查看有关错误的详细堆栈跟踪信息,以及它起源于code。

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.

异常详细信息:System.Data.SqlClient.SqlException:在与SQL Server建立连接时出现与网络相关的或特定于实例的错误。服务器找不到或无法访问。验证实例名称是否正确,以及SQL Server配置为允许远程连接。 (提供者:SQL网络接口,错误:26 - 错误查找服务器/实例指定)

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)

一切都没有改变相关的SQL连接,这是旧的code,我一直使用。 我的网站是完全地瘫痪了,因为这个原因,我感到恶心里面,因为我觉得没有什么我可以做的。


Nothing has changed related to SQL connection, this is OLD code that I always used. My website is completly paralysed because of this and I feel sick inside because I feel there is nothing I can do.

有人能帮助我吗?

当你复制你的新网站版本的服务器上的连接字符串很可能重写。请在web.config中的连接字符串,看看它是否是有效的。

Your connection string was probably overriden when you copied your new website version on the server. Please check the connection string in web.config and see if it is valid.