[wix-users] SqlExtension Incompatible with TLS 1.2 , unable to Create Database

Nir Bar nir.bar at panel-sw.com
Wed Aug 3 08:25:50 PDT 2022


You need ODBC Driver 17 for SQL Server or newer to support TLS 1.2

To restrict use to that driver you can use my WiX extension https://www.nuget.org/packages/PanelSwWixExtension/

        <panelsw:SqlScript BinaryKey="myscript.sql" Driver="ODBC Driver 17 for SQL Server" Server="[MSSQL_SERVER]" Instance="[MSSQL_INSTANCE]" Encrypt="[MSSQL_ENCRYPT]" Port="[MSSQL_PORT]" Username="[MSSQL_USER_NAME]" Password="[MSSQL_USER_PASSWORD]" Database="[MSSQL_DATABASE]" ErrorHandling="prompt" OnInstall="yes"/>



--

Nir Bar

WiX Expert








---- On Tue, 26 Jul 2022 20:08:51 +0300 Sean Hall via wix-users <wix-users at lists.wixtoolset.org> wrote ---



The SQL extension custom action is written in native code not .NET 
Framework. 
 
-2147221164 is REGDB_E_CLASSNOTREG. The extension tries to create the 
SQLNCLI_CLSID COM class, and falls back to CLSID_SQLOLEDB if that fails. I 
believe TLS 1.2 is only supported in SQLNCLI_CLSID. 
 
On Tue, Jul 26, 2022 at 11:56 AM Herman van Drie via wix-users < 
mailto:wix-users at lists.wixtoolset.org> wrote: 
 
> I imagine SQLExtension is written in dotNet 3.5 or older. So, you have to 
> first configure dotNet on underlying OS to tell it needs to use TLS 1.2 
> using a few reg entries: 
> 
> 32 bit  on 64 bit: 
> 
> [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727] 
>  "SystemDefaultTlsVersions" = dword:00000001       "SchUseStrongCrypto" = 
> dword:00000001 
> [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] 
>  "SystemDefaultTlsVersions" = dword:00000001       "SchUseStrongCrypto" = 
> dword:00000001 
> 
> 
> Native 32 or 64 bit: 
> 
> [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727] 
>      "SystemDefaultTlsVersions" = dword:00000001       "SchUseStrongCrypto" 
> = dword:00000001 
> [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319] 
>      "SystemDefaultTlsVersions" = dword:00000001       "SchUseStrongCrypto" 
> = dword:00000001 
> 
> 
> 
> https://docs.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2-client 
> 
> Sent from Surface Duo 
> ________________________________ 
> From: wix-users <mailto:wix-users-bounces at lists.wixtoolset.org> on behalf of 
> ronald mantay via wix-users <mailto:wix-users at lists.wixtoolset.org> 
> Sent: Tuesday, July 26, 2022 6:29:50 PM 
> To: mailto:wix-users at lists.wixtoolset.org <mailto:wix-users at lists.wixtoolset.org> 
> Cc: ronald mantay <mailto:ronald.mantay at hotmail.co.uk> 
> Subject: [wix-users] SqlExtension Incompatible with TLS 1.2 , unable to 
> Create Database 
> 
> Hi 
> 
> Am failing to create a sqlserver 2016 database on a windows 2016 , via wix 
> SqlExtension , using wix 3.14.0.6526 , with tls 1.0&1.1=off and tls1.2=on 
> I.e 
> Error -2147221164 : failed to create sql database 
> 
> 
> Github wixtoolset #5794 , #5543 , lead me to believe there were previous 
> problems in this area , are they resolved  and how ? 
> 
> Any information is gratefully received 
> 
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 
> 
> 
> ____________________________________________________________________ 
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/ 
> 
> ____________________________________________________________________ 
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/ 
> 
 
____________________________________________________________________ 
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list