0

在撰写本文时使用带有所有更新的 Windows 10 Pro 和 VS2015 Pro。在安全模式下运行 VS 并修复 Visual Studio 安装,但没有运气。请注意,SSMS 和其他应用程序可以随时访问数据库 OK。

代码可以缩减为打开一个SQL数据库连接;

Dim sqlCon As New SqlConnection("Server=server\instance;Database=database;User Id=…;Password=…")
sqlCon.Open()
'Works after reboot as many times as required but fails after build or rebuild!
Console.WriteLine(“Connection Opened”)  
sqlCon.Close()
sqlCon.Dispose()

重建后的错误是;

Unhandled Exception: 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)
4

1 回答 1

0

原来我们的 IT 团队已经在 PC 上安装了 Bitdefender Endpoint Security Tools。幸运的是,将合适的防火墙配置文件添加到内部 Bitdefender 管理服务器很简单。

于 2016-08-28T23:30:11.680 回答