I am trying to upgrade from .net 6 to.net 7 in my solution and I have intermittent issues when trying to connect to SQL server Express.
Message=Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21045; handshake=9; Source=Core Microsoft SqlClient Data Provider
StackTrace: at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
my connection strings look like this:
module Connections2 =
open FSharp.Data.Sql
let [<Literal>] artooConnString = "Server=tcp:r2hserver;Database=Artoo;User
Id=sa;Password=xxxxxxx;Encrypt=False;TrustServerCertificate=True"
let [<Literal>] smBoomConnString = "Server=tcp:r2hserver;Database=SMboom;User
Id=sa;Password=xxxxxxx;Encrypt=False;TrustServerCertificate=True"
type artooProvider =
SqlDataProvider<
Common.DatabaseProviderTypes.MSSQLSERVER,
artooConnString,
IndividualsAmount = 1000,
UseOptionTypes = Common.NullableColumnType.VALUE_OPTION>
type smBoomProvider =
SqlDataProvider<
Common.DatabaseProviderTypes.MSSQLSERVER,
smBoomConnString,
IndividualsAmount = 1000,
UseOptionTypes = Common.NullableColumnType.VALUE_OPTION>
Sometimes if I reboot it will work for a while but I have rolled everything back to .net 6 and it all works fine. Ideas?