Skip to content

Commit 4720aa9

Browse files
committed
Updating targeting to 4.7.1 and forcing TLS 1.2
1 parent 0eed8a7 commit 4720aa9

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

samples/features/sql-clr/Curl/Curl.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
/// </summary>
1010
public partial class Curl
1111
{
12+
static Curl()
13+
{
14+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
15+
}
16+
1217
[SqlFunction]
1318
[return: SqlFacet(MaxSize = -1)]
1419
public static SqlChars Get(SqlChars H, SqlChars url)
1520
{
21+
1622
var client = new WebClient();
1723
AddHeader(H, client);
1824
return new SqlChars(
@@ -24,6 +30,7 @@ public static SqlChars Get(SqlChars H, SqlChars url)
2430
[SqlProcedure]
2531
public static void Post(SqlChars H, SqlChars d, SqlChars url)
2632
{
33+
2734
var client = new WebClient();
2835
AddHeader(H, client);
2936
if (d.IsNull)
@@ -39,6 +46,7 @@ public static void Post(SqlChars H, SqlChars d, SqlChars url)
3946
[SqlProcedure]
4047
public static void PostWithRetry(SqlChars H, SqlChars d, SqlChars url)
4148
{
49+
4250
var client = new WebClient();
4351
AddHeader(H, client);
4452
if (d.IsNull)

samples/features/sql-clr/Curl/SqlClrCurl.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>SqlClr</RootNamespace>
1111
<AssemblyName>SqlClrCurl</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<TargetFrameworkProfile />
1515
</PropertyGroup>

0 commit comments

Comments
 (0)