I connect to the MSSQL database through my ASP.NET application, but sometimes I get this error when opening a connection.
Connection timed out. The waiting period has expired while trying to use an authorization confirmation confirmation before entering the system. This may be due to the fact that the handshake before entering the system failed or the server was unable to respond on time. The duration spent trying to connect to this server was - [Pre-Login] initialization = 3; acknowledgment = 14996;
To solve this problem, I have to restart IIS. I use this piece of code to connect to MSSQL:
using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); connection.Close(); connection.Dispose(); SqlConnection.ClearPool(connection); }
I allowed port 1433 in the inbound and outbound rules, but no changes. When I follow the instructions:
but nothing has changed.
source share