myConnection = new SqlConnection("user id=champion3_test;" +
"password=test;server=10.168.1.58;" +
"Trusted_Connection=true;" +
"database=champion3_sabdb; " +
"connection timeout=30");
このコードはエラーを出します:
Thrown: "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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)" (System.Data.SqlClient.SqlException) Exception Message = "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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)", Exception Type = "System.Data.SqlClient.SqlException", Exception WinRT Data = ""
サーバーの設定のデバッグに役立つ可能性のあるスクリーンショットを次に示します。http: //imgur.com/a/PeRby
「champion3_test」が有効なユーザーIDであることがわかっています。「test」はchampion3_testの有効なパスワードです。データベース名は「champion3_sabdb」です。