2016-08-28 13 views
0

Windows 10 ProおよびVS2015 Proを使用しており、すべてのアップデートは書面になっています。セーフモードでVSを実行し、Visual Studioのインストールを修復します。 SSMSや他のアプリはいつでもデータベースにアクセスできます。PCを再起動した後に再構築するとネットワークエラーが発生するのはなぜですか?

コードを減らして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) 
+0

私はそれがネットワーク関連の問題だと思います。 SQL Serverサービスが「自動」に設定されていますか?たぶんそれは "遅延開始"に設定されていますか? –

答えて

0

当社のITチームは、PC上でビットディフェンダーエンドポイントセキュリティツールをインストールしていたが判明。幸い、社内のBitdefender管理サーバーに適切なファイアウォールプロファイルを追加するのは簡単でした。

関連する問題