问题描述:在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: TCP 提供程序, error: 0 - 由于目标机器积极拒绝,无法连接。)
System.Data.SqlClient.SqlException: 在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: TCP 提供程序, error: 0 - 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。)
   在 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   在 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   在 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   在 System.Data.SqlClient.SqlConnection.Open()
   在 DAL.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) 位置 D:\worker\News\News\SQLHelper.cs:行号 881
   在 DAL.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText) 位置 D:\worker\News\News\SQLHelper.cs:行号 849
   在 News.Form1.InsertMTDVB(String lb, String title, String sDate, String ly, String Url) 位置 D:\worker\News\News\Form1.cs:行号 7623
数据库安装在本机,数据库连接字符串代码为:cn.ConnectionString = "Data Source=192.168.1.100,1433;Network Library=DBMSSOCN;Initial Catalog=tvsou;User ID=sa;Password=582401";