F# SQL Serve Handshake Errors after upgrading from .net 6 to .net 7

38 Views Asked by At

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?

0

There are 0 best solutions below

Related Questions in F#

Related Questions in F#-DATA