SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The underlying connection was closed withing a CLR calling dll using TLS 1.2


The underlying connection was closed withing a CLR calling dll using TLS 1.2

Author
Message
be05x5
be05x5
SSC-Enthusiastic
SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)

Group: General Forum Members
Points: 181 Visits: 26
Good Day all,

My preliminary research for the above error leads me to believe that this is an issue with TLS 1.2 security protocol.

I have performed the steps outlined in some of the KB articles. Such as:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001

I have added these keys. And on this one:

HKLM SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2

\Server

and \Client

I created 2 DWORDS for Enabled = 1 and DeisabledByDefault set to 0.

Now what I am doing here is calling a dll which is calling UPS Address Validation (recently switched to TLS 1.2)

using this code:

xavRequest.AddressKeyFormat = addressKeyFormat;
System.Net.ServicePointManager.Expect100Continue = true;
System.Net.ServicePointManager.SecurityProtocol =

System.Net.SecurityProtocolType.Tls12;
AddressValidatorAPI.XAVResponse xavResponse =

xavSvc.ProcessXAV(xavRequest);

My CLR is referencing this DLL. It would seem that my SQL Server which is:

Microsoft SQL Server 2014 (SP2-GDR) (KB4019093) - 12.0.5207.0 (X64) Jul 3 2017 02:25:44 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

Is not supporting TLS 1.2? Any advice would be amazing Smile

Thanks!
be05x5
be05x5
SSC-Enthusiastic
SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)

Group: General Forum Members
Points: 181 Visits: 26
All,

After some serious tries on this, after updating the SQL server with latest framework, I recompiled the DLL used by my CLR and simple ran this statement:
ALTER ASSEMBLY [HLIAddressValidation]
FROM 'C:\HLIAddressValidation.dll'
WITH PERMISSION_SET = SAFE; --or unsafe depending on your configuration and security allowances
GO
Hope this helps someone.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search