I have two mirrored SQL servers (e.g. A and B). I wrote a simple C # program (connect via SqlConnection) that insert rows into a DB. When I make the transition to server A, the program throws an exception, then I try to connect and get an exception by timeout ( **A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0**).
When you restart the application, the connection was successfully established (to server B). Then I switch to another server B and exclude the program exception, then I try to restore the connection, and its work is to connect to the witout restart program.
My connection string:
Data Source=SERVER_A;Failover Partner=SERVER_B;Initial Catalog=TEST_DB;persist security info=True;user id=USER_LOGIN;password=USER_PASS;Connection Timeout=60;
I am also trying to set a large timeout (60 seconds) and try to clear all sqlconnection pools, clear one pool on the connection, but it does not work.
Interesting fact: if I use the login and password for the domain, everything works fine! (User SID are the same)
source
share