我正在使用ASP.NET,C#和mssql的网站上工作。 当我在我们的本地服务器上运行网站时,它工作正常。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.config中指定一个连接字符串? – Fred
是的,我在web.config中指定了我的连接字符串 – Prhem
看看这个网站http://www.connectionstrings.com/sql-server/猜测你的服务器/数据源设置不正确。有些提供商会给你一个连接到服务器的实例。上面的链接将告诉你如何连接它的方式。任何人都很难告诉你到底发生了什么,除非你在你的web配置和主机提供的设置中发布了你的连接字符串设置。 – Fred