vs调试的时候与服务器数据库连接出问题了
在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - 无法打开到 SQL Server 的连接)
vs服务器资源管理器可以访问到远程的服务器数据库
web.config
<add name="xxxxConnectionString1" connectionString="Data Source=xx.xxx.xx.xx;Initial Catalog=xxxx;Persist Security Info=True;User ID=xmgl;Password=xmglgly"服务器名、登录名、密码都没错
providerName="System.Data.SqlClient" />
[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="xxxx")]linq?to?sql 远程连接 服务器
public DataClassesDataContext() :
base(global::System.Configuration.ConfigurationManager.ConnectionStrings["xxxxConnectionString1"].ConnectionString, mappingSource)